Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CacheInvalidator.php
Go to the documentation of this file.
1 <?php
7 
9 {
13  protected $cacheTypeList;
14 
20  public function __construct(\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList)
21  {
22  $this->cacheTypeList = $cacheTypeList;
23  }
24 
33  public function afterAfterSave(
34  \Magento\Framework\App\Config\Value $subject,
35  \Magento\Framework\App\Config\Value $result
36  ) {
38  && $result->isValueChanged()
39  ) {
40  $this->cacheTypeList->invalidate(\Magento\Webapi\Model\Cache\Type\Webapi::TYPE_IDENTIFIER);
41  }
42 
43  return $result;
44  }
45 }
__construct(\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList)
afterAfterSave(\Magento\Framework\App\Config\Value $subject, \Magento\Framework\App\Config\Value $result)