I have set up Varnish and confirm it's running in the server.

In the frontend browser response header shows this:

Accept-Ranges: bytes
Age: 46
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 37639
Content-Type: text/html; charset=UTF-8
Date: Thu, 28 Nov 2019 00:28:31 GMT
Expires: -1
Grace: none
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Magento-Cache-Control: max-age=86400, public, s-maxage=86400
X-Magento-Cache-Debug: HIT
X-UA-Compatible: IE=edge
X-XSS-Protection: 1; mode=block

I don't see any varnish related responses.

Is varnish working at all?

1 Answer 1


you can see configuration file: https://github.com/magento/magento2/blob/9544fb243d5848a497d4ea7b88e08609376ac39e/app/code/Magento/PageCache/etc/varnish6.vcl#L193

probably headers your are looking for just not set or unset.

you have some of them:

Age: 46
Grace: none
X-Magento-Cache-Debug: HIT
  • On the first run (any URL), it shows X-Magento-Cache-Debug: MISS and Age: 0. And when refreshed that URL then it shows HIT. Is this normal behaviour? Commented Jan 8, 2020 at 1:53
  • yes. < 0 miss cache | > 0 hit cache
    – MagenX
    Commented Jan 8, 2020 at 9:50
  • Why does it miss in the first run? Any idea? Commented Jan 8, 2020 at 22:23
  • because there are no any cache created yet, you need to send page request before cache created.
    – MagenX
    Commented Jan 9, 2020 at 9:30

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.