Clean some cache records
Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => unsupported 'matchingTag' => unsupported 'notMatchingTag' => unsupported 'matchingAnyTag' => unsupported
boolean
clean
([string $mode = Zend_Cache::CLEANING_MODE_ALL], [array $tags = array()])
-
string
$mode: clean mode
-
array
$tags: array of tags
Implementation of:
- Zend_Cache_Backend_Interface::clean()
- Clean some cache records
Return an associative array of capabilities (booleans) of the backend
The array must include these keys :
- automatic_cleaning (is automating cleaning necessary)
- tags (are tags supported)
- expired_read (is it possible to read expired cache records
(for doNotTestCacheValidity option for example))
- priority does the backend deal with priority when saving
- infinite_lifetime (is infinite lifetime can work with this backend)
- get_list (is it possible to get the list of cache ids and the complete list of tags)
array
getCapabilities
()
Implementation of:
- Zend_Cache_Backend_ExtendedInterface::getCapabilities()
- Return an associative array of capabilities (booleans) of the backend
Return an array of stored cache ids which match any given tags
In case of multiple tags, a logical AND is made between tags
array
getIdsMatchingAnyTags
([array $tags = array()])
-
array
$tags: array of tags
Implementation of:
- Zend_Cache_Backend_ExtendedInterface::getIdsMatchingAnyTags()
- Return an array of stored cache ids which match any given tags
Return an array of stored cache ids which match given tags
In case of multiple tags, a logical AND is made between tags
array
getIdsMatchingTags
([array $tags = array()])
-
array
$tags: array of tags
Implementation of:
- Zend_Cache_Backend_ExtendedInterface::getIdsMatchingTags()
- Return an array of stored cache ids which match given tags
Return an array of stored cache ids which don't match given tags
In case of multiple tags, a logical OR is made between tags
array
getIdsNotMatchingTags
([array $tags = array()])
-
array
$tags: array of tags
Implementation of:
- Zend_Cache_Backend_ExtendedInterface::getIdsNotMatchingTags()
- Return an array of stored cache ids which don't match given tags
Return an array of metadatas for the given cache id
The array must include these keys :
- expire : the expire timestamp
- tags : a string array of tags
- mtime : timestamp of last modification time
array
getMetadatas
(string $id)
Implementation of:
- Zend_Cache_Backend_ExtendedInterface::getMetadatas()
- Return an array of metadatas for the given cache id
Return true if the automatic cleaning is available for the backend
DEPRECATED : use getCapabilities() instead
boolean
isAutomaticCleaningAvailable
()
Redefinition of:
- Zend_Cache_Backend::isAutomaticCleaningAvailable()
- Return true if the automatic cleaning is available for the backend
Test if a cache is available for the given id and (if yes) return it (false else)
WARNING $doNotTestCacheValidity=true is unsupported by the Apc backend
string
load
(string $id, [boolean $doNotTestCacheValidity = false])
-
string
$id: cache id
-
boolean
$doNotTestCacheValidity: if set to true, the cache validity won't be tested
Implementation of:
- Zend_Cache_Backend_Interface::load()
- Test if a cache is available for the given id and (if yes) return it (false else)
Save some string datas into a cache record
Note : $data is always "string" (serialization is done by the core not by the backend)
boolean
save
(string $data, string $id, [array $tags = array()], [int $specificLifetime = false])
-
string
$data: datas to cache
-
string
$id: cache id
-
array
$tags: array of strings, the cache record will be tagged by each string entry
-
int
$specificLifetime: if != false, set a specific lifetime for this cache record (null => infinite lifetime)
Implementation of:
- Zend_Cache_Backend_Interface::save()
- Save some string datas into a cache record
Test if a cache is available or not (for the given id)
mixed
test
(string $id)
Implementation of:
- Zend_Cache_Backend_Interface::test()
- Test if a cache is available or not (for the given id)
Give (if possible) an extra lifetime to the given cache id
boolean
touch
(string $id, int $extraLifetime)
-
string
$id: cache id
-
int
$extraLifetime
Implementation of:
- Zend_Cache_Backend_ExtendedInterface::touch()
- Give (if possible) an extra lifetime to the given cache id
Inherited Methods
Inherited From Zend_Cache_Backend
Zend_Cache_Backend::__construct()
Zend_Cache_Backend::getLifetime()
Zend_Cache_Backend::getTmpDir()
Zend_Cache_Backend::isAutomaticCleaningAvailable()
Zend_Cache_Backend::setDirectives()
Zend_Cache_Backend::setOption()
Zend_Cache_Backend::_isGoodTmpDir()
Zend_Cache_Backend::_log()
Zend_Cache_Backend::_loggerSanity()