Class DoctrineCacheAdapter
- Aws\DoctrineCacheAdapter implements Aws\CacheInterface, Doctrine\Common\Cache\Cache
- Namespace: Aws
- Located at DoctrineCacheAdapter.php
Represents a simple cache interface.
Methods Summary
- __construct ( Doctrine\Common\Cache\Cache $cache )
-
get ( string $key )
Get a cache item by key.
- fetch ( $key )
-
set ( string $key, mixed $value, int $ttl = 0 )
Set a cache key value.
- save ( $key, $value, $ttl = 0 )
-
remove ( string $key )
Remove a cache key.
- delete ( $key )
- contains ( $key )
- getStats ( )
Methods Details
__construct ( Doctrine\Common\Cache\Cache $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
fetch ( $key )
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
save ( $key, $value, $ttl = 0 )
remove ( string $key )
Remove a cache key.
Parameters
string | $key | Key to remove. |