PsrCacheAdapter
in package
implements
CacheInterface
Interfaces, Classes and Traits
- CacheInterface
- Represents a simple cache interface.
Table of Contents
- $pool : CacheItemPoolInterface
- __construct() : mixed
- get() : mixed|null
- Get a cache item by key.
- remove() : mixed
- Remove a cache key.
- set() : mixed
- Set a cache key value.
Properties
$pool
private
CacheItemPoolInterface
$pool
Methods
__construct()
public
__construct(CacheItemPoolInterface $pool) : mixed
Parameters
- $pool : CacheItemPoolInterface
Return values
mixed —get()
Get a cache item by key.
public
get(mixed $key) : mixed|null
Parameters
- $key : mixed
-
Key to retrieve.
Return values
mixed|null —Returns the value or null if not found.
remove()
Remove a cache key.
public
remove(mixed $key) : mixed
Parameters
- $key : mixed
-
Key to remove.
Return values
mixed —set()
Set a cache key value.
public
set(mixed $key, mixed $value, mixed $ttl) : mixed
Parameters
- $key : mixed
-
Key to set
- $value : mixed
-
Value to set.
- $ttl : mixed
-
Number of seconds the item is allowed to live. Set to 0 to allow an unlimited lifetime.