Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (array $options=array()) | |
load ($id, $doNotTestCacheValidity=false) | |
test ($id) | |
save ($data, $id, $tags=array(), $specificLifetime=false) | |
remove ($id) | |
clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
isAutomaticCleaningAvailable () | |
setDirectives ($directives) | |
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 () | |
Data Fields | |
const | DEFAULT_HOST = '127.0.0.1' |
const | DEFAULT_PORT = 11211 |
const | DEFAULT_WEIGHT = 1 |
const | TAGS_UNSUPPORTED_BY_CLEAN_OF_LIBMEMCACHED_BACKEND = 'Zend_Cache_Backend_Libmemcached::clean() : tags are unsupported by the Libmemcached backend' |
const | TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND = 'Zend_Cache_Backend_Libmemcached::save() : tags are unsupported by the Libmemcached backend' |
Protected Attributes | |
$_options | |
$_memcache = null | |
![]() | |
$_directives | |
$_options = array() | |
Additional Inherited Members | |
![]() | |
_isGoodTmpDir ($dir) | |
_loggerSanity () | |
_log ($message, $priority=4) | |
Definition at line 41 of file Libmemcached.php.
__construct | ( | array | $options = array() | ) |
Constructor
array | $options | associative array of options |
Zend_Cache_Exception |
Definition at line 97 of file Libmemcached.php.
clean | ( | $mode = Zend_Cache::CLEANING_MODE_ALL , |
|
$tags = array() |
|||
) |
Clean some cache records
Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => unsupported 'matchingTag' => unsupported 'notMatchingTag' => unsupported 'matchingAnyTag' => unsupported
string | $mode | Clean mode |
array | $tags | Array of tags |
Zend_Cache_Exception |
Implements Zend_Cache_Backend_Interface.
Definition at line 245 of file Libmemcached.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 472 of file Libmemcached.php.
getFillingPercentage | ( | ) |
Return the filling percentage of the backend storage
Zend_Cache_Exception |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 366 of file Libmemcached.php.
getIds | ( | ) |
Return an array of stored cache ids
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 301 of file Libmemcached.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 354 of file Libmemcached.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 326 of file Libmemcached.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 340 of file Libmemcached.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 409 of file Libmemcached.php.
getTags | ( | ) |
Return an array of stored tags
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 312 of file Libmemcached.php.
isAutomaticCleaningAvailable | ( | ) |
Return true if the automatic cleaning is available for the backend
Definition at line 270 of file Libmemcached.php.
load | ( | $id, | |
$doNotTestCacheValidity = false |
|||
) |
Test if a cache is available for the given id and (if yes) return it (false 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 164 of file Libmemcached.php.
remove | ( | $id | ) |
Remove a cache record
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 225 of file Libmemcached.php.
save | ( | $data, | |
$id, | |||
$tags = array() , |
|||
$specificLifetime = false |
|||
) |
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) |
Implements Zend_Cache_Backend_Interface.
Definition at line 200 of file Libmemcached.php.
setDirectives | ( | $directives | ) |
Set the frontend directives
array | $directives | Assoc of directives |
Zend_Cache_Exception |
Implements Zend_Cache_Backend_Interface.
Definition at line 282 of file Libmemcached.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 179 of file Libmemcached.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 433 of file Libmemcached.php.
|
protected |
Definition at line 88 of file Libmemcached.php.
|
protected |
Definition at line 74 of file Libmemcached.php.
const DEFAULT_HOST = '127.0.0.1' |
Default Server Values
Definition at line 46 of file Libmemcached.php.
const DEFAULT_PORT = 11211 |
Definition at line 47 of file Libmemcached.php.
const DEFAULT_WEIGHT = 1 |
Definition at line 48 of file Libmemcached.php.
const TAGS_UNSUPPORTED_BY_CLEAN_OF_LIBMEMCACHED_BACKEND = 'Zend_Cache_Backend_Libmemcached::clean() : tags are unsupported by the Libmemcached backend' |
Log message
Definition at line 53 of file Libmemcached.php.
const TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND = 'Zend_Cache_Backend_Libmemcached::save() : tags are unsupported by the Libmemcached backend' |
Definition at line 54 of file Libmemcached.php.