if-none-match status

Joe Williams joe at joetify.com
Fri Oct 9 23:41:14 CEST 2009


Has is been considered doing this with the backend servers rather than
the client? Basically to re-validate objects in the cache? A request
hits varnish, varnish requests the backend with an if-none-match header
and the backend replies with either a 200 or 304. This way the client
does not need to know anything of etags, the cache is always up to
date for commonly requested objects and the backend won't need to
produce the content if the object in the cache is the most recent.

Thanks.

-Joe


On Fri, 9 Oct 2009 16:26:14 -0300
Rogério Schneider <stockrt at gmail.com> wrote:

> 2009/10/9 Joe Williams <joe at joetify.com>:
> >
> > Oops, looks like I missed that reply. So it's just a matter of
> > making sure clients use that header and varnish will decide to
> > serve a 304 or an updated object?
> 
> It is, indeed, a matter of "making sure you deliver ETag: response
> header from the backend" and everything is set. From now one the
> clients should "see" this ETag: header in the response, and then start
> issuing If-None-Match: request headers in the next "conditional GETs"
> they made. Then, you have an improved chance of delivering 304 instead
> of 200 + full content.
> 
> Good luck,


-- 
Name: Joseph A. Williams
Email: joe at joetify.com
Blog: http://www.joeandmotorboat.com/



More information about the varnish-misc mailing list