29 protected function _id($cacheId)
31 if ($cacheId !==
null) {
32 $cacheId = str_replace(
'.',
'__', $cacheId);
33 $cacheId = preg_replace(
'/([^a-zA-Z0-9_]{1,1})/',
'_', $cacheId);
34 if (isset($this->_options[
'cache_id_prefix'])) {
35 $cacheId = $this->_options[
'cache_id_prefix'] . $cacheId;
49 foreach ($tags as $key => $tag) {
50 $tags[$key] = $this->
_id($tag);
68 public function save(
$data, $cacheId =
null, $tags = [], $specificLifetime =
false, $priority = 8)
73 $tags = $this->
_tags($tags);
74 return parent::save(
$data, $cacheId, $tags, $specificLifetime, $priority);
97 $tags = $this->
_tags($tags);
98 return parent::clean(
$mode, $tags);
111 $tags = $this->
_tags($tags);
112 return parent::getIdsMatchingTags($tags);
125 $tags = $this->
_tags($tags);
126 return parent::getIdsNotMatchingTags($tags);
138 parent::setBackend($backendObject);
149 if (!is_array($this->_specificOptions[
'backend_decorators'])) {
153 foreach ($this->_specificOptions[
'backend_decorators'] as $decoratorName => $decoratorOptions) {
154 if (!is_array($decoratorOptions) || !array_key_exists(
'class', $decoratorOptions)) {
156 "Concrete decorator options in '" . $decoratorName .
"' should be an array containing 'class' key" 159 $classOptions = array_key_exists(
'options', $decoratorOptions) ? $decoratorOptions[
'options'] : [];
160 $classOptions[
'concrete_backend'] = $backendObject;
164 "Class '" . $decoratorOptions[
'class'] .
"' specified in '" . $decoratorName .
"' does not exist" 168 $backendObject =
new $decoratorOptions[
'class']($classOptions);
169 if (!$backendObject instanceof \
Magento\Framework\Cache\Backend\Decorator\AbstractDecorator) {
173 "' should extend \Magento\Framework\Cache\Backend\Decorator\AbstractDecorator" 178 return $backendObject;
save($data, $cacheId=null, $tags=[], $specificLifetime=false, $priority=8)
setBackend(\Zend_Cache_Backend $backendObject)
_decorateBackend(\Zend_Cache_Backend $backendObject)
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
static throwException($msg, Exception $e=null)
clean($mode='all', $tags=[])
getIdsNotMatchingTags($tags=[])
getIdsMatchingTags($tags=[])