Does varnish support "If-None-Match"-requests?

Kai Moritz kai at ich-geh-kaputt.de
Mon Apr 2 21:12:38 CEST 2012


Because I do not want to teach my backend-server, how to purge cached 
pages, I gave my pages a relatively short max-age (about 300s), so that 
caches regularly have to ask the server, if the page has changed. I also 
set a strong ETag-header on all pages, so that these requests can be 
done with a "If-None-Matches"-header. The ETag only changes, when the 
content really changes, so that most requests can be answred with a 304 
Not-Modified.

This setup works well with browser-caches and squid & co. But it seems 
as if varnish always issues a non-conditional request, when the page was 
expired since the last cache-hit. Does varnish ignore the ETag-header if 
max-age and/or Expires are set or is this a configuration issue?


Greetings

Kai Moritz



More information about the varnish-misc mailing list