|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (array $options=array()) | |
| test ($id) | |
| save ($data, $id, $tags=array(), $specificLifetime=false, $priority=8) | |
| load ($id, $doNotTestCacheValidity=false) | |
| remove ($id) | |
| clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
| getIds () | |
| getTags () | |
| getIdsMatchingTags ($tags=array()) | |
| getIdsNotMatchingTags ($tags=array()) | |
| getIdsMatchingAnyTags ($tags=array()) | |
| getFillingPercentage () | |
| getMetadatas ($id) | |
| touch ($id, $extraLifetime) | |
| getCapabilities () | |
| ___expire ($id) | |
Public Member Functions inherited from Zend_Cache_Backend | |
| __construct (array $options=array()) | |
| setDirectives ($directives) | |
| setOption ($name, $value) | |
| getOption ($name) | |
| getLifetime ($specificLifetime) | |
| isAutomaticCleaningAvailable () | |
| getTmpDir () | |
Public Member Functions inherited from Zend_Cache_Backend_Interface | |
| setDirectives ($directives) | |
| save ($data, $id, $tags=array(), $specificLifetime=false) | |
Protected Attributes | |
| $_options | |
| $_slowBackend | |
| $_fastBackend | |
| $_fastBackendFillingPercentage = null | |
Protected Attributes inherited from Zend_Cache_Backend | |
| $_directives | |
| $_options = array() | |
Additional Inherited Members | |
Protected Member Functions inherited from Zend_Cache_Backend | |
| _isGoodTmpDir ($dir) | |
| _loggerSanity () | |
| _log ($message, $priority=4) | |
Definition at line 42 of file TwoLevels.php.
| __construct | ( | array | $options = array() | ) |
Constructor
| array | $options | Associative array of options |
| Zend_Cache_Exception |
Definition at line 127 of file TwoLevels.php.
| ___expire | ( | $id | ) |
PUBLIC METHOD FOR UNIT TESTING ONLY !
Force a cache record to expire
| string | $id | cache id |
Definition at line 518 of file TwoLevels.php.
| clean | ( | $mode = Zend_Cache::CLEANING_MODE_ALL, |
|
$tags = array() |
|||
| ) |
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) 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 | $mode | Clean mode |
| array | $tags | Array of tags |
| Zend_Cache_Exception |
Implements Zend_Cache_Backend_Interface.
Definition at line 296 of file TwoLevels.php.
| getCapabilities | ( | ) |
Return an associative array of capabilities (booleans) of the backend
The array must include these keys :
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 450 of file TwoLevels.php.
| getFillingPercentage | ( | ) |
Return the filling percentage of the backend storage
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 403 of file TwoLevels.php.
| getIds | ( | ) |
Return an array of stored cache ids
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 344 of file TwoLevels.php.
| 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.
Definition at line 393 of file TwoLevels.php.
| 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.
Definition at line 367 of file TwoLevels.php.
| 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.
Definition at line 380 of file TwoLevels.php.
| 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.
Definition at line 419 of file TwoLevels.php.
| getTags | ( | ) |
Return an array of stored tags
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 354 of file TwoLevels.php.
| load | ( | $id, | |
$doNotTestCacheValidity = false |
|||
| ) |
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)
| 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 230 of file TwoLevels.php.
| remove | ( | $id | ) |
Remove a cache record
| string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 271 of file TwoLevels.php.
| save | ( | $data, | |
| $id, | |||
$tags = array(), |
|||
$specificLifetime = false, |
|||
$priority = 8 |
|||
| ) |
Save some string datas into a cache record
Note : $data is always "string" (serialization is done by the core not by the backend)
| 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) |
| int | $priority | integer between 0 (very low priority) and 10 (maximum priority) used by some particular backends |
Definition at line 196 of file TwoLevels.php.
| test | ( | $id | ) |
Test if a cache is available or not (for the given id)
| string | $id | cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 173 of file TwoLevels.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.
Definition at line 431 of file TwoLevels.php.
|
protected |
Definition at line 111 of file TwoLevels.php.
|
protected |
Definition at line 118 of file TwoLevels.php.
|
protected |
Definition at line 85 of file TwoLevels.php.
|
protected |
Definition at line 104 of file TwoLevels.php.