Hi,

We use Varnish to cache for multiple backends and need Varnish to always 
control what is cached despite what backends could respond. In other words, 
even if a backend sets Cache-Control headers to never cache its pages, we still 
want Varnish to cache them based on defined rules (i.e. certain URL patterns or 
hosts have different TTLs).

We have recently realized that one of our backend always set the following 
header: Cache-Control: max-age=0, private, must-revalidate

Our VCL unsets the Cache-Control header in vcl_backend_response and sets its 
own before delivering. By unsetting the Cache-Control header in 
vcl_backend_response I would expect Varnish to ignore the max-age=0 value and 
still cache the page as per our other rules, but it seems that the second it 
sees max-age=0 in the response header, that it makrs the object as not 
cacheable.

Other than by changing the backend's response to never set max-age=0, is there 
a way to force Varnish to cach pages even if it returned max-age=0?

Is this even by design or is it a bug?

Thanks,
Yanick Girouard

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to