Cache-control: no-cache

Jacob Elder jelder at locamoda.com
Mon Dec 13 20:55:23 CET 2010


On Mon, Dec 13, 2010 at 12:08 PM, James A. Robinson <
jim.robinson at stanford.edu> wrote:

> 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
>

You are right but I should have been more clear. I believe that Varnish
should honor no-cache from backends but not necessarily from clients.

-- 
Jacob Elder
@jelder
(646) 535-3379
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101213/d537b45e/attachment-0003.html>


More information about the varnish-misc mailing list