◆ __construct()
- Parameters
-
\Magento\PageCache\Model\Config | $config | |
\Magento\CacheInvalidate\Model\PurgeCache | $purgeCache | |
Definition at line 35 of file InvalidateVarnishObserver.php.
◆ execute()
If Varnish caching is enabled it collects array of tags of incoming object and asks to clean cache.
- Parameters
-
\Magento\Framework\Event\Observer | $observer | |
- Returns
- void
Definition at line 50 of file InvalidateVarnishObserver.php.
52 $object =
$observer->getEvent()->getObject();
53 if (!is_object($object)) {
57 $bareTags = $this->getTagResolver()->getTags($object);
61 foreach ($bareTags as $tag) {
65 $this->purgeCache->sendPurgeRequest(implode(
'|', array_unique($tags)));
◆ $config
◆ $purgeCache
The documentation for this class was generated from the following file: