has()
has(string $key) : bool
Check if a value exists in the cache.
Parameters
| string | $key | Holds the cache key to check. |
Returns
bool —Returns true if the key exists in the cache, otherwise false.
Cache adapter interface.
The CacheAdapterInterface defines the contract for cache adapters, allowing different
cache storage systems to be used interchangeably within the framework.
put(string $key, mixed $value, int|null $seconds = null) : $this
Store a value in the cache with an optional expiration time.
| string | $key | Holds the cache key to store. |
| mixed | $value | Holds the value to store in the cache. |
| int|null | $seconds | Holds the number of seconds until the cache item expires (null for no expiration). |
Return the cache adapter instance.