Handling of cache-control

Laurence Rowe l at lrowe.co.uk
Mon Jan 18 15:04:46 CET 2010

2010/1/18 Tollef Fog Heen <tfheen at redpill-linpro.com>:
> Hi all,
> we are considering changing the defaults on how the cache-control header
> is handled in Varnish.  Currently, we only look at s-maxage and maxage
> to decide if and how long an object should be cached.  (We also look at
> expires, but that's not relevant here.)
> My suggestion is to also look at Cache-control: no-cache, possibly also
> private and no-store and obey those.  You would still be able to
> override this in vcl by setting obj.cacheable to true and the ttl to
> some value.
> The reason I think we should at least consider changing this is the
> principle of least surprise: we support max-age and s-maxage, so we
> should also support the other common values of the cache-control header
> field.
> Feedback very welcome,

Given the proposed move away from having the default vcl, it would
seem logical to move cache-control header logic into VCL. The less
magic that happens behind the scenes, the easier it is to understand
what a particular configuration will do.


More information about the varnish-misc mailing list