Answer the question
In order to leave comments, you need to log in
Why doesn't Varnish use hot cache to push back to users?
Hello,
I am using the link from (NGINX + PHP5-FPM) -> VARNISH -> User.
Warm-up is used to warm up the cache. (i.e. every 10 minutes the server logs on itself, updating the cache)
After clearing the cache, the pages are loaded for the first time in about 2 seconds, then - 0.02 seconds, since from the cache (if you look at the logs)
But! If you go to a simple user from a laptop - the first time the page is loaded for a long time, as if not from the cache. Subsequent times - quickly, from the cache.
Question: why does the page load again for a simple user? Why is it not taken from the hot cache?
What's the point of making a cache then?
This module is used for cache - https://github.com/nexcess/magento-turpentine/wiki...
Answer the question
In order to leave comments, you need to log in
The issue was resolved, indeed the hash in the VCL was considered taking into account the user-agent of the visitor.
This was done so that if the mobile version of the store is used, but it is cached separately. In the case of the adaptive version, this is not necessary. Now everything works fast.
you take a page not from the cache
, it is logical that the cache warm-up does not work for you
The default vcl Varnish prevents cached pages from being served if the request contained cookies or an authorization header:
if (req.http.Authorization || req.http.Cookie) {
/* Not cacheable by default */
return (pass);
}
warm-up warms up the cache, most likely with the user agent other
output: you need to remove the browser from the hash
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question