fastly/fastly-magento2

Fastly is not setting the converted cache tags

Closed this issue · 2 comments

Issue description

Fastly is not setting the converted cache tags, I've done some debugging and the culprit seems to be the ResponsePlugin and the identical operator here:

if ($this->config->getType() !== Config::FASTLY) {

As you can see on the screenshot, the value returned by $this->config->getType() is string, and the Config::FASTLY is int. Because of this, it never sets the converted cache tags and the module is not able to clear the cache per tag.

Steps to reproduce the issue

  1. Have Fastly configured
  2. Load a category page
  3. Check headers

What's the expected result?

  • the X-Magento-Tags (or the Surrogate-Key) header contains the converted Magento tags instead of the original ones
    e.g. for category page: cat_c c505 cat_p p571041

What's the actual result?

  • the X-Magento-Tags (or the Surrogate-Key) header contains the original Magento tags instead of the converted ones
    e.g. for category page: cat_c,cat_c_505,cat_p,cat_p_571041

Additional details / screenshot

Screenshot 2022-11-10 at 18 34 44

I'm using Magento Commerce 2.4.2-p2 and the Fastly Magento module version 1.2.164.

Thank you for raising the issue with us, @laszloborzas!

Was released in 1.2.194