cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with invalidating Varnish cache

Issues with invalidating Varnish cache

We are running Magento 2.2.2 with Redis and we are testing with Varnish 5.2 with our Nginx 1.10 webserver.

 

We are using the VCL5 config file Magento generated for us and the health_check is running well.

 

While everything seems to work including SSL termination, we seem to have some unexpected behaviour with updating / invalidating the varnish cache.

 

Our http_cache_hosts seems to be working well. When we clear the cache we can see that the first request of a page is uncached. However, when we make changes to a product it does not become visibile on the front end.

 

For example, we are switching a product 'Stock Status' from 'In Stock' to 'Out of Stock' and vice versa. 

 

After changing the Stock Status and saving it, we check the front end, also after the cron ran, the status does not change on the front end.

 

When we press the save-button again in the backend to save the product, the change is finally visible at the front end.

So in short: we have to save a product twice in our backend to show the changes on the frontend.

But sometimes Stock Status changes in the backend do apply after the first product-save. 

 

I'm puzzled, somebody any thoughts?

2 REPLIES

Re: Issues with invalidating Varnish cache

Nobody?

Re: Issues with invalidating Varnish cache

While posting a question here doesn't seem to work well (at least if you want an answer, LOL), I digged a bit and found this:

 

https://github.com/magento/magento2/issues/5980

 

Seems to be related.