Class Psr16CacheAdapter
- Aws\Psr16CacheAdapter implements Aws\CacheInterface
- Namespace: Aws
- Located at Psr16CacheAdapter.php
Represents a simple cache interface.
Methods Summary
- __construct ( Psr\SimpleCache\CacheInterface $cache )
-
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
__construct ( Psr\SimpleCache\CacheInterface $cache )
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. |
Implementation of
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. |
Implementation of
remove ( string $key )
Remove a cache key.
Parameters
string | $key | Key to remove. |