I am a bit confused about varnish cache and not quite sure about what is going on. I seem to have it set up my mage loads reasonably quick on first load ~800ms request. Now that it is warmed it requests drop to 1ms which seems great. However when i visit that same warmed page on another browser / computer speeds seem to drop back down to the initial visit speed.

I am trying to warm the cache with a script on the server but it doesn't seem to be making a difference. What have i done wrong with the configuration here?


You need to make sure that:

  • Your backend does not send Vary: User-Agent HTTP header. That can be the reason why different browser end up in "different cache" by Varnish
  • Your VCL ignores all browser cookies except the ones that are really relevant to your app (e.g. Google Analytics, etc. never make use of on the app level, so you should ignore them). The best approach is whitelisting cookies.
| improve this answer | |
  • Think i sorted this now just started using the config provided by Magento in admin. Now just finding difficulty to get varnish to start as a service – harri Nov 23 '17 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.