Interface CacheInterface
Represents a simple cache interface.
Direct known implementers
Aws\DoctrineCacheAdapter
,
Aws\LruArrayCache
,
Aws\Psr16CacheAdapter
,
Aws\PsrCacheAdapter
Methods Summary
-
get ( string $key )
Get a cache item by key.
-
set ( string $key, mixed $value, int $ttl = 0 )
Set a cache key value.
-
remove ( string $key )
Remove a cache key.
Methods Details
mixed|null get ( string $key )
Get a cache item by key.
Parameters
string | $key | Key to retrieve. |
Returns
mixed|null Returns the value or null if not found. |
set ( string $key, mixed $value, integer $ttl = 0 )
Set a cache key value.
Parameters
string | $key | Key to set |
mixed | $value | Value to set. |
integer | $ttl = 0 | Number of seconds the item is allowed to live. Set to 0 to allow an unlimited lifetime. |
remove ( string $key )
Remove a cache key.
Parameters
string | $key | Key to remove. |