package | Zend_Cache |
---|---|
subpackage | Zend_Cache_Frontend |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Cache_Core |
__construct(array $options = array()
) : void
inherited_from | \Zend_Cache_Core::__construct() |
---|
array
Associative array of options
__construct(array|\Zend_Config $options = array()
) : void
array
\Zend_Config
Associative array of options or Zend_Config instance
\Zend_Cache_Exception |
---|
call(callback $callback, array $parameters= array()
, array $tags= array()
, integer $specificLifetime= false
, integer $priority= 8
) : mixed
callback
A valid callback
array
Function parameters
array
Cache tags
integer
If != false, set a specific lifetime for this cache record (null => infinite lifetime)
integer
integer between 0 (very low priority) and 10 (maximum priority) used by some particular backends
mixed
Resultclean(string $mode= 'all'
, array|string $tags= array()
) : boolean
Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => remove too old cache entries ($tags is not used) 'matchingTag' => remove cache entries matching all given tags ($tags can be an array of strings or a single string) 'notMatchingTag' => remove cache entries not matching one of the given tags ($tags can be an array of strings or a single string) 'matchingAnyTag' => remove cache entries matching any given tags ($tags can be an array of strings or a single string)
string
array
string
\Zend_Cache_Exception |
---|
boolean
True if okgetBackend() : \Zend_Cache_Backend
\Zend_Cache_Backend
backend objectgetFillingPercentage() : integer
integer
integer between 0 and 100getIds() : array
array
array of stored cache ids (string)getIdsMatchingAnyTags(array $tags = array()
) : array
In case of multiple tags, a logical OR is made between tags
array
array of tags
array
array of matching any cache ids (string)getIdsMatchingTags(array $tags = array()
) : array
In case of multiple tags, a logical AND is made between tags
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
array
array of tags
array
array of not matching cache ids (string)getMetadatas(string $id) : array
The array will include these keys :
string
cache id
array
array of metadatas (false if the cache id is not found)getOption(string $name) : mixed
string
Name of the option
\Zend_Cache_Exception |
---|
mixed
option valuegetTags() : array
array
array of stored tags (string)load(string $id, boolean $doNotTestCacheValidity= false
, boolean $doNotUnserialize= false
) : mixed | false
string
Cache id
boolean
If set to true, the cache validity won't be tested
boolean
Do not serialize (even if automatic_serialization is true) => for internal use
mixed
false
Cached datasmakeId(callback $callback, array $args = array()
) : string
callback
A valid callback
array
Function parameters
\Zend_Cache_Exception |
---|
string
Cache idremove(string $id) : boolean
string
Cache id to remove
boolean
True if oksave(mixed $data, string $id= null
, array $tags= array()
, integer $specificLifetime= false
, integer $priority= 8
) : boolean
mixed
Data to put in cache (can be another type than string if automatic_serialization is on)
string
Cache id (if not set, the last cache id will be used)
array
Cache tags
integer
If != false, set a specific lifetime for this cache record (null => infinite lifetime)
integer
integer between 0 (very low priority) and 10 (maximum priority) used by some particular backends
\Zend_Cache_Exception |
---|
boolean
True if no problemsetBackend(\Zend_Cache_Backend $backendObject) : void
\Zend_Cache_Backend
\Zend_Cache_Exception |
---|
setConfig(\Zend_Config $config) : \Zend_Cache_Core
\Zend_Config
\Zend_Cache_Core
setLifetime(integer $newLifetime) : void
The new value is set for the core/frontend but for the backend too (directive)
integer
New lifetime (in seconds)
setOption(string $name, mixed $value) : void
There is an additional validation (relatively to the protected _setOption method)
string
Name of the option
mixed
Value of the option
\Zend_Cache_Exception |
---|
test(string $id) : integer | false
string
Cache id
integer
false
Last modified time of cache entry if it is available, false otherwisetouch(string $id, integer $extraLifetime) : boolean
string
cache id
integer
boolean
true if ok_id(string $id) : string
Checks 'cache_id_prefix' and returns new id with prefix or simply the id if null
string
Cache id
string
Cache id (with or without prefix)_log(string $message, $priority = 4
) : void
string
\Zend_Cache_Exception |
---|
_loggerSanity() : void
Create a default log object if none is set.
\Zend_Cache_Exception |
---|
_validateIdOrTag(string $string) : void
..)
Throw an exception if a problem is found
string
Cache id or tag
\Zend_Cache_Exception |
---|
_validateTagsArray(array $tags) : void
..)
Throw an exception if a problem is found
array
Array of tags
\Zend_Cache_Exception |
---|
_makeId($callback, array $args)
deprecated |
---|
_setOption(string $name, mixed $value) : void
string
Name of the option
mixed
Value of the option
\Zend_Cache_Exception |
---|
$_backend : \Zend_Cache_Backend_Interface
null
$_backendCapabilities : array
array()
$_directivesList : array
array('lifetime', 'logging', 'logger')
$_extendedBackend : boolean
false
$_specificOptions : array
array('cache_by_default' => true, 'cached_functions' => array(), 'non_cached_functions' => array())
====> (boolean) cache_by_default :
====> (array) cached_functions :
====> (array) non_cached_functions :
inherited_from | \Zend_Cache_Core::_specificOptions |
---|
$_specificOptions : array
array()
$_lastId : string
null
BACKEND_NOT_IMPLEMENTS_EXTENDED_IF = 'Current backend doesn\'t implement the Zend_Cache_Backend_ExtendedInterface, so this method is not available'
BACKEND_NOT_SUPPORTS_TAG = 'tags are not supported by the current backend'