23 private $frontendFactory;
37 $this->frontendFactory = $frontendFactory;
38 $this->_frontend = $frontendFactory();
39 $this->pid = getmypid();
45 public function test($identifier)
47 return $this->getFrontEnd()->test($this->
_unifyId($identifier));
53 public function load($identifier)
55 return $this->getFrontEnd()->load($this->
_unifyId($identifier));
61 public function save(
$data, $identifier, array $tags = [], $lifeTime =
null)
63 return $this->getFrontEnd()->save(
$data, $this->
_unifyId($identifier), $this->
_unifyIds($tags), $lifeTime);
69 public function remove($identifier)
71 return $this->getFrontEnd()->remove($this->
_unifyId($identifier));
92 throw new \InvalidArgumentException(
93 "Magento cache frontend does not support the cleaning mode '{$mode}'." 96 return $this->getFrontEnd()->clean(
$mode, $this->
_unifyIds($tags));
104 return $this->getFrontEnd()->getBackend();
112 return $this->getFrontEnd();
123 return strtoupper($identifier);
134 foreach ($ids as $key =>
$value) {
145 private function getFrontEnd()
147 if (getmypid() === $this->pid) {
150 $frontendFactory = $this->frontendFactory;
151 $this->_frontend = $frontendFactory();
152 $this->pid = getmypid();
clean($mode=\Zend_Cache::CLEANING_MODE_ALL, array $tags=[])
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
const CLEANING_MODE_MATCHING_ANY_TAG
const CLEANING_MODE_MATCHING_TAG
save($data, $identifier, array $tags=[], $lifeTime=null)
__construct(\Closure $frontendFactory)