ClassInterface Zend_Cache_Backend_Interface

Description
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Cache/Backend/Interface.php (line 30)


	
			
Method Summary
 boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [tags $tags = array()])
 string load (string $id, [boolean $doNotTestCacheValidity = false])
 boolean remove (string $id)
 boolean save (string $data, string $id, [array $tags = array()], [int $specificLifetime = false])
 void setDirectives (array $directives)
 mixed test (string $id)
Methods
clean (line 96)

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)

  • return: true if no problem
  • access: public
boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [tags $tags = array()])
  • string $mode: clean mode
  • tags $tags: array $tags array of tags
load (line 49)

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)

  • return: cached datas (or false)
  • access: public
string load (string $id, [boolean $doNotTestCacheValidity = false])
  • string $id: cache id
  • boolean $doNotTestCacheValidity: if set to true, the cache validity won't be tested
remove (line 79)

Remove a cache record

  • return: true if no problem
  • access: public
boolean remove (string $id)
  • string $id: cache id
save (line 71)

Save some string datas into a cache record

Note : $data is always "string" (serialization is done by the core not by the backend)

  • return: true if no problem
  • access: public
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)
setDirectives (line 38)

Set the frontend directives

  • access: public
void setDirectives (array $directives)
  • array $directives: assoc of directives
test (line 57)

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

  • return: false (a cache is not available) or "last modified" timestamp (int) of the available cache record
  • access: public
mixed test (string $id)
  • string $id: cache id

Documentation generated on Wed, 28 Nov 2007 15:46:45 -0600 by phpDocumentor 1.4.0