Closed
Description
Preconditions (*)
- Magento 2.3.5
- Varnish-6.0.6
- Elasticsearch 6
- PHP 7.2.30
Steps to reproduce (*)
- 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
- 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
- purchase that product
- 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(,|$))
- 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 (*)
- 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 (*)
- Placing an order causes all cache tags related to that product to be cleared.
Severity: S2