Public Member Functions | |
__construct ($options=array()) | |
setDirectives ($directives) | |
load ($id, $doNotTestCacheValidity=false) | |
test ($id) | |
save ($data, $id, $tags=array(), $specificLifetime=false) | |
remove ($id) | |
clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
getLastLog () | |
getLogIndex () | |
getAllLogs () | |
isAutomaticCleaningAvailable () | |
Protected Attributes | |
$_options = array() | |
$_directives = array() |
Definition at line 40 of file Test.php.
__construct | ( | $ | options = array() ) |
clean | ( | $ | mode = Zend_Cache::CLEANING_MODE_ALL , |
$ | tags = array() |
||
) |
Clean some cache records
For this test backend only, if $mode == 'false', then the method will return false (true else)
Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags ($tags can be an array of strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags} ($tags can be an array of strings or a single string)
string | $mode | Clean mode |
array | $tags | Array of tags |
Implements Zend_Cache_Backend_Interface.
getAllLogs | ( | ) |
getLastLog | ( | ) |
isAutomaticCleaningAvailable | ( | ) |
Return true if the automatic cleaning is available for the backend
Reimplemented from Zend_Cache_Backend.
load | ( | $ | id, |
$ | doNotTestCacheValidity = false |
||
) |
Test if a cache is available for the given id and (if yes) return it (false else)
For this test backend only, if $id == 'false', then the method will return false if $id == 'serialized', the method will return a serialized array ('foo' else)
string | $id | Cache id |
boolean | $doNotTestCacheValidity | If set to true, the cache validity won't be tested |
Implements Zend_Cache_Backend_Interface.
remove | ( | $ | id ) |
Remove a cache record
For this test backend only, if $id == 'false', then the method will return false (true else)
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
save | ( | $ | data, |
$ | id, | ||
$ | tags = array() , |
||
$ | specificLifetime = false |
||
) |
Save some string datas into a cache record
For this test backend only, if $id == 'false', then the method will return false (true else)
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) |
Implements Zend_Cache_Backend_Interface.
setDirectives | ( | $ | directives ) |
Set the frontend directives
array | $directives | assoc of directives |
Implements Zend_Cache_Backend_Interface.
test | ( | $ | id ) |
Test if a cache is available or not (for the given id)
For this test backend only, if $id == 'false', then the method will return false (123456 else)
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.