Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-cache-invalidate
Observer
FlushAllCacheObserver.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CacheInvalidate\Observer
;
7
8
use
Magento\Framework\Event\ObserverInterface
;
9
10
class
FlushAllCacheObserver
implements
ObserverInterface
11
{
17
protected
$config
;
18
22
protected
$purgeCache
;
23
28
public
function
__construct
(
29
\
Magento
\PageCache\Model\Config
$config
,
30
\
Magento
\CacheInvalidate\Model\PurgeCache
$purgeCache
31
) {
32
$this->config =
$config
;
33
$this->purgeCache =
$purgeCache
;
34
}
35
43
public
function
execute
(\
Magento
\Framework\Event\Observer
$observer
)
44
{
45
if
($this->config->getType() ==
\Magento\PageCache\Model\Config::VARNISH
&& $this->config->isEnabled()) {
46
$this->purgeCache->sendPurgeRequest(
'.*'
);
47
}
48
}
49
}
Magento\CacheInvalidate\Observer\FlushAllCacheObserver\execute
execute(\Magento\Framework\Event\Observer $observer)
Definition:
FlushAllCacheObserver.php:43
Magento\PageCache\Model\Config\VARNISH
const VARNISH
Definition:
Config.php:28
Magento\CacheInvalidate\Observer
Definition:
FlushAllCacheObserver.php:6
Magento\Framework\Event\ObserverInterface
Definition:
ObserverInterface.php:16
Magento\CacheInvalidate\Observer\FlushAllCacheObserver
Definition:
FlushAllCacheObserver.php:10
$observer
$observer
Definition:
second_website_with_second_currency.php:38
Magento\CacheInvalidate\Observer\FlushAllCacheObserver\$config
$config
Definition:
FlushAllCacheObserver.php:17
Magento\CacheInvalidate\Observer\FlushAllCacheObserver\__construct
__construct(\Magento\PageCache\Model\Config $config, \Magento\CacheInvalidate\Model\PurgeCache $purgeCache)
Definition:
FlushAllCacheObserver.php:28
Magento
Magento\CacheInvalidate\Observer\FlushAllCacheObserver\$purgeCache
$purgeCache
Definition:
FlushAllCacheObserver.php:22