package Zend_Cache
subpackage Zend_Cache_Backend
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Clean some cache records

clean(string $mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = array()) : boolean

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

$mode

string

Clean mode

$tags

array

Array of tags

Returns

booleantrue if no problem

Test if a cache is available for the given id and (if yes) return it (false else)

load(string $id, boolean $doNotTestCacheValidity = false) : string | false

Note : return value is always "string" (unserialization is done by the core not by the backend)

Parameters

$id

string

Cache id

$doNotTestCacheValidity

boolean

If set to true, the cache validity won't be tested

Returns

stringfalsecached datas

Remove a cache record

remove(string $id) : boolean

Parameters

$id

string

Cache id

Returns

booleanTrue if no problem

Save some string datas into a cache record

save(string $data, string $id, array $tags = array(), integer $specificLifetime = false) : boolean

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

Parameters

$data

string

Datas to cache

$id

string

Cache id

$tags

array

Array of strings, the cache record will be tagged by each string entry

$specificLifetime

integer

If != false, set a specific lifetime for this cache record (null => infinite lifetime)

Returns

booleantrue if no problem

Set the frontend directives

setDirectives(array $directives) 

Parameters

$directives

array

assoc of directives

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

test(string $id) : mixed | false

Parameters

$id

string

cache id

Returns

mixedfalse(a cache is not available) or "last modified" timestamp (int) of the available cache record