Handling of cache-control

Tollef Fog Heen tfheen at redpill-linpro.com
Mon Jan 18 14:20:47 CET 2010


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,

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73



More information about the varnish-misc mailing list