Adapter for Magento -> Zend cache frontend interfaces
Definition at line 11 of file Zend.php.
◆ __construct()
__construct |
( |
\Closure |
$frontendFactory | ) |
|
- Parameters
-
Definition at line 35 of file Zend.php.
37 $this->frontendFactory = $frontendFactory;
38 $this->_frontend = $frontendFactory();
39 $this->pid = getmypid();
◆ _unifyId()
Retrieve single unified identifier
- Parameters
-
- Returns
- string
Definition at line 121 of file Zend.php.
123 return strtoupper($identifier);
◆ _unifyIds()
Retrieve multiple unified identifiers
- Parameters
-
- Returns
- array
Definition at line 132 of file Zend.php.
134 foreach ($ids as $key =>
$value) {
◆ clean()
{Clean cache records matching specified tags
- Parameters
-
- Returns
- bool @api
}
- Exceptions
-
Implements FrontendInterface.
Definition at line 80 of file Zend.php.
92 throw new \InvalidArgumentException(
93 "Magento cache frontend does not support the cleaning mode '{$mode}'." 96 return $this->getFrontEnd()->clean(
$mode, $this->
_unifyIds($tags));
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
const CLEANING_MODE_MATCHING_ANY_TAG
const CLEANING_MODE_MATCHING_TAG
◆ getBackend()
{Retrieve backend instance
- Returns
- \Zend_Cache_Backend_Interface
}
Implements FrontendInterface.
Definition at line 102 of file Zend.php.
104 return $this->getFrontEnd()->getBackend();
◆ getLowLevelFrontend()
{Retrieve frontend instance compatible with Zend Locale Data setCache() to be used as a workaround
- Returns
- \Zend_Cache_Core
}
Implements FrontendInterface.
Definition at line 110 of file Zend.php.
112 return $this->getFrontEnd();
◆ load()
{Load cache record by its unique identifier
- Parameters
-
- Returns
- string|bool @api
}
Implements FrontendInterface.
Definition at line 53 of file Zend.php.
55 return $this->getFrontEnd()->load($this->
_unifyId($identifier));
◆ remove()
{Remove cache record by its unique identifier
- Parameters
-
- Returns
- bool @api
}
Implements FrontendInterface.
Definition at line 69 of file Zend.php.
71 return $this->getFrontEnd()->remove($this->
_unifyId($identifier));
◆ save()
save |
( |
|
$data, |
|
|
|
$identifier, |
|
|
array |
$tags = [] , |
|
|
|
$lifeTime = null |
|
) |
| |
{Save cache record
- Parameters
-
string | $data | |
string | $identifier | |
array | $tags | |
int | bool | null | $lifeTime | |
- Returns
- bool @api
}
Implements FrontendInterface.
Definition at line 61 of file Zend.php.
63 return $this->getFrontEnd()->save(
$data, $this->
_unifyId($identifier), $this->
_unifyIds($tags), $lifeTime);
◆ test()
{Test if a cache is available for the given id
- Parameters
-
string | $identifier | Cache id |
- Returns
- int|bool Last modified time of cache entry if it is available, false otherwise
}
Implements FrontendInterface.
Definition at line 45 of file Zend.php.
47 return $this->getFrontEnd()->test($this->
_unifyId($identifier));
◆ $_frontend
The documentation for this class was generated from the following file:
- vendor/magento/framework/Cache/Frontend/Adapter/Zend.php