Cache-control: no-cache

James A. Robinson jim.robinson at stanford.edu
Mon Dec 13 18:08:19 CET 2010


On Mon, Dec 13, 2010 at 08:55, Jacob Elder <jelder at locamoda.com> wrote:
> Just posting this so it will make it into the mailing list archives, and
> hopefully spark a discussion:
> The default Varnish config does not honor "no-cache" in Cache-control
> headers. It is my personal opinion that it should, but it's easy enough to
> add this behavior if desired.
> sub vcl_fetch {
>     if (beresp.http.cache-control ~ "no-cache") {
>         return(pass);
>     }
> }

I think it really depends on your application.  As someone who deals
with publications that change rarely (new content comes in frequently,
but rarely changes), we have to deal with bots that crawl the site and
specify no-cache -- it doesn't make sense to honor that request if we
know the data hasn't actually changed.


Jim




More information about the varnish-misc mailing list