0

I have configured varnish and enabled this in magento configuration to use in full page cache. Also updated vcl file downloaded from magento. But this doesn't work, every time request's response gives MISS and AGE 0 . Currently running magento in developer mode. enter image description here

Anyone have any clue why this happening and how can i resolve this.

  • do you have a special cache configuration in your app/etc/env.php? – David Verholen Dec 22 '16 at 19:44
  • i am using redis for session. – Gulshan Maurya Dec 23 '16 at 5:09
1

Based on your screenshot, the first thing you should pay attention to is the Set-Cookie.

Every time a page returns it Varnish Cache will not cache the page.

So you need to remove all the cookie manipulation from the pages you want to cache.

One way you could do that is to use a specific page to treat all the cookies and call it as an AJAX in the pages that are cached.

That way, even if the page is cached that piece of dynamic information will be handled by AJAX.

Remember to add this specific page to the cache exceptions so it will not be cached at all.

  • Do you know what i am missing in configuring magento2? – Gulshan Maurya Dec 22 '16 at 16:14
  • I'm not really into Magento lately, but I don't believe it is just a configuration. Probably you are going to need to customize it to work properly in order to Varnish to be really effective. – alejdg Dec 22 '16 at 16:34

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.