RedisStorage
class RedisStorage extends AbstractDriverCacheStorage (View source)
Class RedisStorage
Methods
Class init.
Removes multiple items from the pool.
Confirms if the cache contains specified cache item.
Method to determine whether a storage entry has been set for a key.
Method to set property options
Sets a cache item to be persisted later.
Here we pass in a cache key to be fetched from the cache.
Persisting our data in the cache, uniquely referenced by a key with an optional expiration TTL time.
Remove an item from the cache by its unique key
This will wipe out the entire cache's keys
Details
at line line 44
__construct(object $driver = null, int $ttl = null, mixed $options = array())
Class init.
in AbstractCacheStorage at line line 74
Traversable
getItems(array $keys = array())
getItems
in AbstractCacheStorage at line line 93
AbstractCacheStorage
deleteItems(array $keys)
Removes multiple items from the pool.
in AbstractCacheStorage at line line 120
bool
hasItem(string $key)
Confirms if the cache contains specified cache item.
Note: This method MAY avoid retrieving the cached value for performance reasons. This could result in a race condition with CacheItemInterface::get(). To avoid such situation use CacheItemInterface::isHit() instead.
at line line 61
bool
exists(string $key)
Method to determine whether a storage entry has been set for a key.
in AbstractCacheStorage at line line 149
array
getOptions()
Method to get property Options
in AbstractCacheStorage at line line 161
AbstractCacheStorage
setOptions(array $options)
Method to set property options
in AbstractCacheStorage at line line 177
bool
saveDeferred(CacheItemInterface $item)
Sets a cache item to be persisted later.
in AbstractCacheStorage at line line 195
bool
commit()
Persists any deferred cache items.
in AbstractDriverCacheStorage at line line 53
object
getDriver()
getDriver
in AbstractDriverCacheStorage at line line 65
AbstractDriverCacheStorage
setDriver(object $driver)
setDriver
at line line 76
CacheItemInterface
getItem(string $key)
Here we pass in a cache key to be fetched from the cache.
A CacheItem object will be constructed and returned to us
at line line 105
RedisStorage
save(CacheItemInterface $item, int|DateInterval|DateTime $ttl = null)
Persisting our data in the cache, uniquely referenced by a key with an optional expiration TTL time.
at line line 129
RedisStorage
deleteItem(string $key)
Remove an item from the cache by its unique key
at line line 143
RedisStorage
clear()
This will wipe out the entire cache's keys