I found this in debug.log file on my Magento ver. 2.1.8 store but don't really understand what it is saying. Can someone explain?

http://lb1.i:80/)"],"tagsPattern":"((^|,)catalog_product_3666(,|$))|((^|,)catalog_category_product_55(,|$))|((^|,)catalog_category_product_65(,|$))|((^|,)catalog_category_product_127(,|$))|((^|,)catalog_product_3668(,|$))"},"is_exception":false} []
  • Do you have varnish on the server? – Adrian Z. Mar 12 '18 at 10:43
  • Yes I use Varnish. – Greg Mar 12 '18 at 10:44

The pattern in your debug.log is trigger on product save.

In InvalidateVarnishObserver (module-cache-invalidate):

public function execute(\Magento\Framework\Event\Observer $observer)
    if ($this->config->getType() == \Magento\PageCache\Model\Config::VARNISH && $this->config->isEnabled()) {
        $object = $observer->getEvent()->getObject();
        if ($object instanceof \Magento\Framework\DataObject\IdentityInterface) {
            $tags = [];
            $pattern = "((^|,)%s(,|$))";
            foreach ($object->getIdentities() as $tag) {
                $tags[] = sprintf($pattern, preg_replace("~_\\d+$~", '', $tag));
                $tags[] = sprintf($pattern, $tag);
            $this->purgeCache->sendPurgeRequest(implode('|', array_unique($tags)));

Will trigger a purge request for any object with X-Magento-Tag matching ((^|,)catalog_product(,|$))|((^|,)catalog_product_(,|$)).

You can read more here.

| improve this answer | |
  • Yhyyy, so it's saying that if product was changed or "saved", purge varnish cache for this product? So this entry in the debug.log file is only informative? Thank you for your interest, you are helpful! – Greg Mar 12 '18 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.