\RedisBackend
- Copyright: Copyright (c) 2015 Andre lohmann
Synopsis
class RedisBackend
extends Zend_Cache_Backend
implements
Zend_Cache_Backend_ExtendedInterface
{
- // constants
- const DEFAULT_HOST = '127.0.0.1';
- const DEFAULT_PORT = 6379;
- const DEFAULT_TIMEOUT = 0;
- const TAGS_UNSUPPORTED_BY_CLEAN_OF_REDIS_BACKEND = 'Zend_Cache_Backend_Redis::clean() : tags are unsupported by the Redis backend';
- const TAGS_UNSUPPORTED_BY_SAVE_OF_REDIS_BACKEND = 'Zend_Cache_Backend_Redis::save() : tags are unsupported by the Redis backend';
- // methods
- public void __construct()
- public string|false load()
- public int|false test()
- public boolean save()
- public boolean remove()
- public boolean clean()
- public boolean isAutomaticCleaningAvailable()
- public void setDirectives()
- public array getIds()
- public array getTags()
- public array getIdsMatchingTags()
- public array getIdsNotMatchingTags()
- public array getIdsMatchingAnyTags()
- public int getFillingPercentage()
- public array getMetadatas()
- public boolean touch()
- public array getCapabilities()
Hierarchy
Extends
- Zend_Cache_Backend
Implements
- Zend_Cache_Backend_ExtendedInterface
Constants
Name | Value |
---|---|
DEFAULT_HOST | '127.0.0.1' |
DEFAULT_PORT | 6379 |
DEFAULT_TIMEOUT | 0 |
TAGS_UNSUPPORTED_BY_CLEAN_OF_REDIS_BACKEND | 'Zend_Cache_Backend_Redis::clean() : tags are unsupported by the Redis backend' |
TAGS_UNSUPPORTED_BY_SAVE_OF_REDIS_BACKEND | 'Zend_Cache_Backend_Redis::save() : tags are unsupported by the Redis backend' |
Members
protected
- $_options
—
array
Available options - $_redis
—
mixed
Redis object
Methods
public
- __construct() — Constructor
- clean() — Clean some cache records
- getCapabilities() — Return an associative array of capabilities (booleans) of the backend
- getFillingPercentage() — Return the filling percentage of the backend storage
- getIds() — Return an array of stored cache ids
- getIdsMatchingAnyTags() — Return an array of stored cache ids which match any given tags
- getIdsMatchingTags() — Return an array of stored cache ids which match given tags
- getIdsNotMatchingTags() — Return an array of stored cache ids which don't match given tags
- getMetadatas() — Return an array of metadatas for the given cache id
- getTags() — Return an array of stored tags
- isAutomaticCleaningAvailable() — Return true if the automatic cleaning is available for the backend
- load() — Test if a cache is available for the given id and (if yes) return it (false else)
- remove() — Remove a cache record
- save() — Save some string datas into a cache record
- setDirectives() — Set the frontend directives
- test() — Test if a cache is available or not (for the given id)
- touch() — Give (if possible) an extra lifetime to the given cache id