Skip to content

Varnish cache is cleared for the product and categories after an order is placed #30128

Closed
@bmitchell-ldg

Description

@bmitchell-ldg

Preconditions (*)

  1. Magento 2.3.5
  2. Varnish-6.0.6
  3. Elasticsearch 6
  4. PHP 7.2.30

Steps to reproduce (*)

  1. Go to a category page and inspect the page and refresh until you see a x-cache HIT confirming that the page is being cached
  2. Pick a simple product on that category page and on the product page inpect the page and refresh until you see the x-cache HIT confirming that the page is being cached
  3. purchase that product
  4. within the next couple of minutes you will see a purge request sent to varnish for that product i assume because the stock level changed (product saved)
  • ReqMethod PURGE
  • ReqURL /
  • ReqHeader X-Magento-Tags-Pattern: ((^|,)cat_p_43(,|$))
  1. refresh the category and product pages and see the x-cache MISS for both the category and product pages related to that specific product

The more categories the product is related to the more of an issue it causes for the website as all of the categories related to the product are being purged.

Expected result (*)

  1. Since the actual stock level is not something that is displayed on the frontend as default, then i can't think of a reason why it should need to purge the cache everytime the quantity changes. I would have thought it would only carry out the cache purge if the stock status had changed because it would need to show the new instock/out of stock status on the product/category pages. Any website with fast selling products is never going to be able to keep the cache warm.

Actual result (*)

  1. Placing an order causes all cache tags related to that product to be cleared.

Severity: S2

Metadata

Metadata

Assignees

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.3.5Indicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions