Public Member Functions

Zend_Cache_Backend_Interface Interface Reference

Inheritance diagram for Zend_Cache_Backend_Interface:
Zend_Cache_Backend_ExtendedInterface Zend_Cache_Backend_Test Zend_Cache_Backend_Xcache Zend_Cache_Backend_ZendPlatform Zend_Cache_Backend_ZendServer Zend_Cache_Backend_ZendServer_Disk Zend_Cache_Backend_ZendServer_ShMem Zend_Cache_Backend_Apc Zend_Cache_Backend_File Zend_Cache_Backend_Memcached Zend_Cache_Backend_Sqlite Zend_Cache_Backend_TwoLevels Zend_Cache_Backend_ZendServer_Disk Zend_Cache_Backend_ZendServer_ShMem

Public Member Functions

 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())

Detailed Description

Definition at line 30 of file Interface.php.


Member Function Documentation

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)

Parameters:
string$modeClean mode
array$tagsArray of tags
Returns:
boolean true if no problem

Implemented in Zend_Cache_Backend_Apc, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendPlatform, and Zend_Cache_Backend_ZendServer.

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)

Parameters:
string$idCache id
boolean$doNotTestCacheValidityIf set to true, the cache validity won't be tested
Returns:
string|false cached datas

Implemented in Zend_Cache_Backend_Apc, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendPlatform, and Zend_Cache_Backend_ZendServer.

remove ( id )
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)

Parameters:
string$dataDatas to cache
string$idCache id
array$tagsArray of strings, the cache record will be tagged by each string entry
int$specificLifetimeIf != false, set a specific lifetime for this cache record (null => infinite lifetime)
Returns:
boolean true if no problem

Implemented in Zend_Cache_Backend_Apc, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendPlatform, and Zend_Cache_Backend_ZendServer.

setDirectives ( directives )

Set the frontend directives

Parameters:
array$directivesassoc of directives

Implemented in Zend_Cache_Backend_Memcached, and Zend_Cache_Backend_Test.

test ( id )

Test if a cache is available or not (for the given id)

Parameters:
string$idcache id
Returns:
mixed|false (a cache is not available) or "last modified" timestamp (int) of the available cache record

Implemented in Zend_Cache_Backend_Apc, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Xcache, Zend_Cache_Backend_ZendPlatform, and Zend_Cache_Backend_ZendServer.


The documentation for this interface was generated from the following file: