Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Bare.php
Go to the documentation of this file.
1 <?php
12 
14 {
20  private $_frontend;
21 
25  public function __construct(\Magento\Framework\Cache\FrontendInterface $frontend)
26  {
27  $this->_frontend = $frontend;
28  }
29 
36  protected function setFrontend(\Magento\Framework\Cache\FrontendInterface $frontend)
37  {
38  $this->_frontend = $frontend;
39  return $this;
40  }
41 
47  protected function _getFrontend()
48  {
49  return $this->_frontend;
50  }
51 
55  public function test($identifier)
56  {
57  return $this->_getFrontend()->test($identifier);
58  }
59 
63  public function load($identifier)
64  {
65  return $this->_getFrontend()->load($identifier);
66  }
67 
73  public function save($data, $identifier, array $tags = [], $lifeTime = null)
74  {
75  return $this->_getFrontend()->save($data, $identifier, $tags, $lifeTime);
76  }
77 
81  public function remove($identifier)
82  {
83  return $this->_getFrontend()->remove($identifier);
84  }
85 
89  public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = [])
90  {
91  return $this->_getFrontend()->clean($mode, $tags);
92  }
93 
97  public function getBackend()
98  {
99  return $this->_getFrontend()->getBackend();
100  }
101 
105  public function getLowLevelFrontend()
106  {
107  return $this->_getFrontend()->getLowLevelFrontend();
108  }
109 }
save($data, $identifier, array $tags=[], $lifeTime=null)
Definition: Bare.php:73
__construct(\Magento\Framework\Cache\FrontendInterface $frontend)
Definition: Bare.php:25
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
Definition: grid.phtml:15
setFrontend(\Magento\Framework\Cache\FrontendInterface $frontend)
Definition: Bare.php:36
clean($mode=\Zend_Cache::CLEANING_MODE_ALL, array $tags=[])
Definition: Bare.php:89
const CLEANING_MODE_ALL
Definition: Cache.php:72