0

When I refresh page and check the header of homepage I got this below information where x-varnish-age=0 enter image description here Want to confirm if there is an issue with cacheable="false"? If any block on page is cacheable="false" so it causes x-varnish-age=0 for that page ? If yes if I have to make some block noncacheable, what should I do to make page varnish cacheable ?

1 Answer 1

1

I see that there's a Set-Cookie header in your response. That will cause Varnish to mark this incoming response as uncacheable because it changes the state.

If the next request for this resource doesn't return a response that contains the Set-Cookie header, you'll be fine and Varnish will store the object in the cache.

If every request returns a Set-Cookie header, the page will never end up in the cache.

As yourself why this cookie needs to be set and if this happens only once?

If you're looking for more information on Varnish and Magento, please have a look at the following article: https://www.varnish-software.com/developers/tutorials/configuring-varnish-magento/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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