Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($options=array()) | |
setDirectives ($directives) | |
load ($id, $doNotTestCacheValidity=false) | |
test ($id) | |
save ($data, $id, $tags=array(), $specificLifetime=false) | |
remove ($id) | |
clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
getLastLog () | |
getLogIndex () | |
getAllLogs () | |
isAutomaticCleaningAvailable () | |
getIds () | |
getTags () | |
getIdsMatchingTags ($tags=array()) | |
getIdsNotMatchingTags ($tags=array()) | |
getIdsMatchingAnyTags ($tags=array()) | |
getFillingPercentage () | |
getMetadatas ($id) | |
touch ($id, $extraLifetime) | |
getCapabilities () | |
![]() | |
__construct (array $options=array()) | |
setDirectives ($directives) | |
setOption ($name, $value) | |
getOption ($name) | |
getLifetime ($specificLifetime) | |
isAutomaticCleaningAvailable () | |
getTmpDir () | |
Protected Attributes | |
$_options = array() | |
$_directives = array() | |
![]() | |
$_directives | |
$_options = array() | |
Additional Inherited Members | |
![]() | |
_isGoodTmpDir ($dir) | |
_loggerSanity () | |
_log ($message, $priority=4) | |
__construct | ( | $options = array() | ) |
clean | ( | $mode = Zend_Cache::CLEANING_MODE_ALL , |
|
$tags = array() |
|||
) |
Clean some cache records
For this test backend only, if $mode == 'false', then the method will return false (true else)
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)
string | $mode | Clean mode |
array | $tags | Array of tags |
Implements Zend_Cache_Backend_Interface.
Definition at line 212 of file Test.php.
getAllLogs | ( | ) |
getCapabilities | ( | ) |
Return an associative array of capabilities (booleans) of the backend
The array must include these keys :
Implements Zend_Cache_Backend_ExtendedInterface.
getFillingPercentage | ( | ) |
Return the filling percentage of the backend storage
Implements Zend_Cache_Backend_ExtendedInterface.
getIds | ( | ) |
Return an array of stored cache ids
Implements Zend_Cache_Backend_ExtendedInterface.
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
array | $tags | array of tags |
Implements Zend_Cache_Backend_ExtendedInterface.
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
array | $tags | array of tags |
Implements Zend_Cache_Backend_ExtendedInterface.
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
array | $tags | array of tags |
Implements Zend_Cache_Backend_ExtendedInterface.
getLogIndex | ( | ) |
getMetadatas | ( | $id | ) |
Return an array of metadatas for the given cache id
The array must include these keys :
string | $id | cache id |
Implements Zend_Cache_Backend_ExtendedInterface.
getTags | ( | ) |
Return an array of stored tags
Implements Zend_Cache_Backend_ExtendedInterface.
isAutomaticCleaningAvailable | ( | ) |
load | ( | $id, | |
$doNotTestCacheValidity = false |
|||
) |
Test if a cache is available for the given id and (if yes) return it (false else)
For this test backend only, if $id == 'false', then the method will return false if $id == 'serialized', the method will return a serialized array ('foo' else)
string | $id | Cache id |
boolean | $doNotTestCacheValidity | If set to true, the cache validity won't be tested |
Implements Zend_Cache_Backend_Interface.
Definition at line 103 of file Test.php.
remove | ( | $id | ) |
Remove a cache record
For this test backend only, if $id == 'false', then the method will return false (true else)
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 185 of file Test.php.
save | ( | $data, | |
$id, | |||
$tags = array() , |
|||
$specificLifetime = false |
|||
) |
Save some string datas into a cache record
For this test backend only, if $id == 'false', then the method will return false (true else)
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) |
Implements Zend_Cache_Backend_Interface.
Definition at line 167 of file Test.php.
setDirectives | ( | $directives | ) |
Set the frontend directives
array | $directives | assoc of directives |
Implements Zend_Cache_Backend_Interface.
test | ( | $id | ) |
Test if a cache is available or not (for the given id)
For this test backend only, if $id == 'false', then the method will return false (123456 else)
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 143 of file Test.php.
touch | ( | $id, | |
$extraLifetime | |||
) |
Give (if possible) an extra lifetime to the given cache id
string | $id | cache id |
int | $extraLifetime |
Implements Zend_Cache_Backend_ExtendedInterface.