Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
setOption ($name, $value) | |
getOption ($name) | |
load ($id, $doNotTestCacheValidity=false) | |
test ($id) | |
save ($data, $id, $tags=array(), $specificLifetime=false) | |
remove ($id) | |
removeRecursively ($id) | |
clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
setInnerCache (Zend_Cache_Core $cache) | |
getInnerCache () | |
![]() | |
__construct (array $options=array()) | |
setDirectives ($directives) | |
setOption ($name, $value) | |
getOption ($name) | |
getLifetime ($specificLifetime) | |
isAutomaticCleaningAvailable () | |
getTmpDir () | |
![]() | |
setDirectives ($directives) | |
Data Fields | |
const | INNER_CACHE_NAME = 'zend_cache_backend_static_tagcache' |
Protected Member Functions | |
_createDirectoriesFor ($path) | |
_isSerialized ($data) | |
_verifyPath ($path) | |
_detectId () | |
_octdec ($val) | |
_decodeId ($id) | |
![]() | |
_isGoodTmpDir ($dir) | |
_loggerSanity () | |
_log ($message, $priority=4) | |
Static Protected Member Functions | |
static | _validateIdOrTag ($string) |
Protected Attributes | |
$_options | |
$_tagCache = null | |
$_tagged = null | |
![]() | |
$_directives | |
$_options = array() | |
Definition at line 39 of file Static.php.
|
protected |
Recursively create the directories needed to write the static file
Definition at line 276 of file Static.php.
|
protected |
Decode a request URI from the provided ID
string | $id |
Definition at line 575 of file Static.php.
|
protected |
Determine the page to save from the request
Definition at line 518 of file Static.php.
|
protected |
Detect serialization of data (cannot predict since this is the only way to obey the interface yet pass in another parameter).
In future, ZF 2.0, check if we can just avoid the interface restraints.
This format is the only valid one possible for the class, so it's simple to just run a regular expression for the starting serialized format.
Definition at line 298 of file Static.php.
|
protected |
Detect an octal string and return its octal value for file permission ops otherwise return the non-string (assumed octal or decimal int already)
string | $val | The potential octal in need of conversion |
Definition at line 561 of file Static.php.
|
staticprotected |
Validate a cache id or a tag (security, reliable filenames, reserved prefixes...)
Throw an exception if a problem is found
string | $string | Cache id or tag |
Zend_Cache_Exception |
Definition at line 533 of file Static.php.
|
protected |
Verify path exists and is non-empty
string | $path |
Definition at line 506 of file Static.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_Exception |
Implements Zend_Cache_Backend_Interface.
Definition at line 398 of file Static.php.
getInnerCache | ( | ) |
getOption | ( | $name | ) |
Retrieve any option via interception of the parent's statically held options including the local option for a tag cache.
string | $name |
Definition at line 118 of file Static.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 138 of file Static.php.
remove | ( | $id | ) |
Remove a cache record
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 309 of file Static.php.
removeRecursively | ( | $id | ) |
Remove a cache record recursively for the given directory matching a REQUEST_URI based relative path (deletes the actual file matching this in addition to the matching directory)
string | $id | Cache id |
Definition at line 344 of file Static.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 215 of file Static.php.
setInnerCache | ( | Zend_Cache_Core | $cache | ) |
Set an Inner Cache, used here primarily to store Tags associated with caches created by this backend. Note: If Tags are lost, the cache should be completely cleaned as the mapping of tags to caches will have been irrevocably lost.
Zend_Cache_Core |
Definition at line 481 of file Static.php.
setOption | ( | $name, | |
$value | |||
) |
Interceptor child method to handle the case where an Inner Cache object is being set since it's not supported by the standard backend interface
string | $name | |
mixed | $value |
Definition at line 83 of file Static.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 172 of file Static.php.
|
protected |
Definition at line 49 of file Static.php.
|
protected |
Definition at line 66 of file Static.php.
|
protected |
Definition at line 72 of file Static.php.
const INNER_CACHE_NAME = 'zend_cache_backend_static_tagcache' |
Definition at line 43 of file Static.php.