Zend Framework  1.12
Public Member Functions | List of all members
Zend_Cache_Backend_ExtendedInterface Interface Reference

Public Member Functions

 getIds ()
 Return an array of stored cache ids.
 
 getTags ()
 Return an array of stored tags.
 
 getIdsMatchingTags ($tags=array())
 Return an array of stored cache ids which match given tags.
 
 getIdsNotMatchingTags ($tags=array())
 Return an array of stored cache ids which don't match given tags.
 
 getIdsMatchingAnyTags ($tags=array())
 Return an array of stored cache ids which match any given tags.
 
 getFillingPercentage ()
 Return the filling percentage of the backend storage.
 
 getMetadatas ($id)
 Return an array of metadatas for the given cache id.
 
 touch ($id, $extraLifetime)
 Give (if possible) an extra lifetime to the given cache id.
 
 getCapabilities ()
 Return an associative array of capabilities (booleans) of the backend.
 
- Public Member Functions inherited from Zend_Cache_Backend_Interface
 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.
 

Member Function Documentation

getCapabilities ( )

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)
Returns
array associative of with capabilities

Implemented in Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_File, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Test, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.

getFillingPercentage ( )
getIds ( )
getIdsMatchingAnyTags (   $tags = array())

Return an array of stored cache ids which match any given tags.

In case of multiple tags, a logical AND is made between tags

Parameters
array$tagsarray of tags
Returns
array array of any matching cache ids (string)

Implemented in Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.

getIdsMatchingTags (   $tags = array())

Return an array of stored cache ids which match given tags.

In case of multiple tags, a logical AND is made between tags

Parameters
array$tagsarray of tags
Returns
array array of matching cache ids (string)

Implemented in Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Test, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.

getIdsNotMatchingTags (   $tags = array())

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

Parameters
array$tagsarray of tags
Returns
array array of not matching cache ids (string)

Implemented in Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_File, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_Test, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.

getMetadatas (   $id)

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
Parameters
string$idcache id
Returns
array array of metadatas (false if the cache id is not found)

Implemented in Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_File, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_Test, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.

getTags ( )
touch (   $id,
  $extraLifetime 
)

Give (if possible) an extra lifetime to the given cache id.

Parameters
string$idcache id
int$extraLifetime
Returns
boolean true if ok

Implemented in Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Libmemcached, Zend_Cache_Backend_File, Zend_Cache_Backend_Sqlite, Zend_Cache_Backend_TwoLevels, Zend_Cache_Backend_Test, Zend_Cache_Backend_Apc, Zend_Cache_Backend_WinCache, and Zend_Cache_Backend_BlackHole.