Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
InvalidateCache.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
16  protected $_typeList;
17 
23  protected $_config;
24 
29  public function __construct(
30  \Magento\PageCache\Model\Config $config,
31  \Magento\Framework\App\Cache\TypeListInterface $typeList
32  ) {
33  $this->_config = $config;
34  $this->_typeList = $typeList;
35  }
36 
44  public function execute(\Magento\Framework\Event\Observer $observer)
45  {
46  if ($this->_config->isEnabled()) {
47  $this->_typeList->invalidate('full_page');
48  }
49  }
50 }
$config
Definition: fraud_order.php:17
__construct(\Magento\PageCache\Model\Config $config, \Magento\Framework\App\Cache\TypeListInterface $typeList)
execute(\Magento\Framework\Event\Observer $observer)