RedisStorage
class RedisStorage extends CacheStorage
Redis cache storage handler for PECL
Properties
integer | $_now | Time that the cache storage handler was instantiated | from CacheStorage |
integer | $_lifetime | Cache lifetime | from CacheStorage |
boolean | $_locking | Flag if locking is enabled | from CacheStorage |
string | $_language | Language code | from CacheStorage |
string | $_application | Application name | from CacheStorage |
string | $_hash | Object hash | from CacheStorage |
Methods
Constructor
Returns a cache storage handler object.
Check if the cache contains data stored by ID and group
Get cached data by ID and group
Get all cached data
Store the data to cache by ID and group
Remove a cached data entry by ID and group
Clean cache for a group given a mode.
Test to see if the storage handler is available.
Add a directory where CacheStorage should search for handlers. You may either pass a string or an array of directories.
Test to see if the Redis connection is available.
Details
static
CacheStorage
getInstance(
string $handler = null,
array $options = array())
Returns a cache storage handler object.
boolean
contains(
string $id,
string $group)
Check if the cache contains data stored by ID and group
boolean
clean(
string $group,
string $mode = null)
Clean cache for a group given a mode.
group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group