no-cache, must-revalidate, max-age=0 for
Cache-Control that you see only applies to browser caches, which instructs Magento HTML to not be cached by them.
Cache-Control that you're seeing is emitted by Varnish VCL. This is fine, and this value does not make Varnish cache less effective. This is only meant for browsers.
Varnish will use a different
Cache-Control, emitted by Magento itself. Varnish cache lifetime depends on the TTL setting you have in Magento backend.
You can access Magento HTTP headers (by doing
curl against the proper port) directly and you'll see that the
Cache-Control emitted by it is different, typically one day:
Cache-Control: max-age=86400, public, s-maxage=86400. This is what Varnish sees and uses to define how long it caches public pages.
Cache-Control: no-store, no-cache, must-revalidate, max-age=0 is to be expected unless you're checking Magento headers directly
- To cache things longer by Varnish, adjust the TTL in Magento settings