Zend Framework
1.12
|
Public Member Functions | |
setDirectives ($directives) | |
Set the frontend directives. | |
load ($id, $doNotTestCacheValidity=false) | |
Test if a cache is available for the given id and (if yes) return it (false else) | |
test ($id) | |
Test if a cache is available or not (for the given id) | |
save ($data, $id, $tags=array(), $specificLifetime=false) | |
Save some string datas into a cache record. | |
remove ($id) | |
Remove a cache record. | |
clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
Clean some cache records. | |
clean | ( | $mode = Zend_Cache::CLEANING_MODE_ALL , |
|
$tags = array() |
|||
) |
Clean some cache records.
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) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags ($tags can be an array of strings or a single string)
string | $mode | Clean mode |
array | $tags | Array of tags |
Implemented in Zend_Cache_Backend_Static, Zend_Cache_Backend_File, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.
load | ( | $id, | |
$doNotTestCacheValidity = false |
|||
) |
Test if a cache is available for the given id and (if yes) return it (false else)
Note : return value is always "string" (unserialization is done by the core not by the backend)
string | $id | Cache id |
boolean | $doNotTestCacheValidity | If set to true, the cache validity won't be tested |
Implemented in Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Static, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.
remove | ( | $id | ) |
Remove a cache record.
string | $id | Cache id |
Implemented in Zend_Cache_Backend_Static, Zend_Cache_Backend_File, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.
save | ( | $data, | |
$id, | |||
$tags = array() , |
|||
$specificLifetime = false |
|||
) |
Save some string datas into a cache record.
Note : $data is always "string" (serialization is done by the core not by the backend)
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) |
Implemented in Zend_Cache_Backend_File, Zend_Cache_Backend_Static, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Test, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.
setDirectives | ( | $directives | ) |
Set the frontend directives.
array | $directives | assoc of directives |
Implemented in Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, and Zend_Cache_Backend_Test.
test | ( | $id | ) |
Test if a cache is available or not (for the given id)
string | $id | cache id |
Implemented in Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Static, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Test, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_ZendPlatform, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendServer, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.