package | Zend_Cache |
---|---|
subpackage | Zend_Cache_Backend |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Cache_Backend |
___expire(string $id)
Force a cache record to expire
string
cache id
__construct(array $options = array()
)
inherited_from | \Zend_Cache_Backend::__construct() |
---|
array
associative array of options
\Zend_Cache_Exception |
---|
__construct(array $options = array()
)
array
Associative array of options
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)
string
clean mode
array
array of tags
boolean
true if no problemgetCapabilities() : array
The array must include these keys :
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getCapabilities() |
---|
array
associative of with capabilitiesgetFillingPercentage() : integer
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getFillingPercentage() |
---|
\Zend_Cache_Exception |
---|
integer
integer between 0 and 100getIds() : array
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getIds() |
---|
array
array of stored cache ids (string)getIdsMatchingAnyTags(array $tags = array()
) : array
In case of multiple tags, a logical AND is made between tags
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getIdsMatchingAnyTags() |
---|
array
array of tags
array
array of any matching cache ids (string)getIdsMatchingTags(array $tags = array()
) : array
In case of multiple tags, a logical AND is made between tags
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getIdsMatchingTags() |
---|
array
array of tags
array
array of matching cache ids (string)getIdsNotMatchingTags(array $tags = array()
) : array
In case of multiple tags, a logical OR is made between tags
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getIdsNotMatchingTags() |
---|
array
array of tags
array
array of not matching cache ids (string)getLifetime(integer $specificLifetime) : integer
if $specificLifetime is not false, the given specific life time is used else, the global lifetime is used
integer
integer
Cache life timegetMetadatas(string $id) : array
The array must include these keys :
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getMetadatas() |
---|
string
cache id
array
array of metadatas (false if the cache id is not found)getOption(string $name) : mixed
string
Optional, the options name to return
\Zend_Cache_Exceptions |
---|
mixed
getTags() : array
inherited_from | \Zend_Cache_Backend_ExtendedInterface::getTags() |
---|
array
array of stored tags (string)getTmpDir() : string
inspired from Zend_File_Transfer_Adapter_Abstract
\Zend_Cache_Exception |
if unable to determine directory |
---|
string
isAutomaticCleaningAvailable() : boolean
DEPRECATED : use getCapabilities() instead
deprecated |
---|
boolean
load(string $id, boolean $doNotTestCacheValidity = false
) : string | false
string
cache id
boolean
if set to true, the cache validity won't be tested
string
false
cached datasremove(string $id) : boolean
string
cache id
boolean
true if no problemsave(string $data, string $id, array $tags= array()
, boolean|integer $specificLifetime= false
) : boolean
Note : $data is always "string" (serialization is done by the core not by the backend)
string
Datas to cache
string
Cache id
array
Array of strings, the cache record will be tagged by each string entry
boolean
integer
If != false, set a specific lifetime for this cache record (null => infinite lifetime)
boolean
true if no problemsetCacheDir(string $value, boolean $trailingSeparator = true
) : void
string
boolean
If true, add a trailing separator is necessary
\Zend_Cache_Exception |
---|
setDirectives(array $directives) : void
array
Assoc of directives
\Zend_Cache_Exception |
---|
setOption(string $name, mixed $value) : void
string
mixed
\Zend_Cache_Exception |
---|
test(string $id) : mixed
string
cache id
mixed
false (a cache is not available) or "last modified" timestamp (int) of the available cache recordtouch(string $id, integer $extraLifetime) : boolean
inherited_from | \Zend_Cache_Backend_ExtendedInterface::touch() |
---|
string
cache id
integer
boolean
true if ok_clean(string $dir, 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)
string
Directory to clean
string
Clean mode
array
Array of tags
\Zend_Cache_Exception |
---|
boolean
True if no problem_cleanMetadatas() : void
_delMetadatas(string $id) : boolean
string
Cache id
boolean
True if no problem_expireTime(integer $lifetime) : integer
integer
integer
expire time (unix timestamp)_file(string $id) : string
string
Cache id
string
File name (with path)_fileGetContents(string $file) : string
string
File complete path
string
File content (or false if problem)_fileNameToId(string $fileName) : string
string
File name
string
Cache id_filePutContents(string $file, string $string) : boolean
string
File complete path
string
String to put in file
boolean
true if no problem_get($dir, $mode, $tags = array()
)
_getMetadatas(string $id) : array | false
string
Cache id
array
false
Associative array of metadatas_hash(string $data, string $controlType) : string
string
Data
string
Type of control 'md5', 'crc32' or 'strlen'
\Zend_Cache_Exception |
---|
string
Control key_idToFileName(string $id) : string
string
Cache id
string
File name_isGoodTmpDir(string $dir) : boolean
string
temporary directory
boolean
true if the directory is ok_isMetadatasFile(string $fileName) : boolean
string
File name
boolean
True if it's a metadatas one_loadMetadatas(string $id) : array | false
string
Cache id
array
false
Metadatas associative array_log(string $message, integer $priority = 4
) : void
string
integer
_loggerSanity() : void
Create a default log object if none is set.
\Zend_Cache_Exception |
---|
_path(string $id, boolean $parts = false
) : string
string
Cache id
boolean
if true, returns array of directory parts instead of single string
string
Complete directory path_recursiveMkdirAndChmod(string $id) : boolean
string
cache id
boolean
true_remove(string $file) : boolean
If we can't remove the file (because of locks or any problem), we will touch the file to invalidate it
string
Complete file path
boolean
True if ok_saveMetadatas(string $id, array $metadatas) : boolean
string
Cache id
array
Associative array
boolean
True if no problem_setMetadatas(string $id, array $metadatas, boolean $save = true
) : boolean
string
Cache id
array
Associative array of metadatas
boolean
optional pass false to disable saving to file
boolean
True if no problem_test(string $id, boolean $doNotTestCacheValidity) : boolean | mixed
string
Cache id
boolean
If set to true, the cache validity won't be tested
boolean
mixed
false (a cache is not available) or "last modified" timestamp (int) of the available cache record$_directives : array
array('lifetime' => 3600, 'logging' => false, 'logger' => null)
=====> (int) lifetime :
=====> (int) logging :