Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
InvalidateCache Class Reference
Inheritance diagram for InvalidateCache:
ObserverInterface

Public Member Functions

 __construct (\Magento\PageCache\Model\Config $config, \Magento\Framework\App\Cache\TypeListInterface $typeList)
 
 execute (\Magento\Framework\Event\Observer $observer)
 
- Public Member Functions inherited from ObserverInterface
 execute (Observer $observer)
 

Protected Attributes

 $_typeList
 
 $_config
 

Detailed Description

Definition at line 11 of file InvalidateCache.php.

Constructor & Destructor Documentation

◆ __construct()

Parameters
\Magento\PageCache\Model\Config$config
\Magento\Framework\App\Cache\TypeListInterface$typeList

Definition at line 29 of file InvalidateCache.php.

32  {
33  $this->_config = $config;
34  $this->_typeList = $typeList;
35  }
$config
Definition: fraud_order.php:17

Member Function Documentation

◆ execute()

execute ( \Magento\Framework\Event\Observer  $observer)

Invalidate full page cache

Parameters
\Magento\Framework\Event\Observer$observer
Returns
void @SuppressWarnings(PHPMD.UnusedFormalParameter)

Definition at line 44 of file InvalidateCache.php.

45  {
46  if ($this->_config->isEnabled()) {
47  $this->_typeList->invalidate('full_page');
48  }
49  }

Field Documentation

◆ $_config

$_config
protected

Definition at line 23 of file InvalidateCache.php.

◆ $_typeList

$_typeList
protected

Definition at line 16 of file InvalidateCache.php.


The documentation for this class was generated from the following file: