Support for If-None-Match header.
geoff at uplex.de
Mon Jan 23 14:20:57 CET 2017
On 01/23/2017 01:56 PM, Jan Hugo Prins | BetterBe wrote:
> Somewhere I found an old Trac Wiki document that describes
> something like this, but I can't figure out if this has been
> implemented or not.
Wiki page is obsolete -- it was about an experimental branch that
was developed while Varnish 3 was the released version.
(Maybe we should delete the Wiki page, it's not the first time someone
has been led astray.)
Varnish has supported 304 responses to client requests with
If-Modified-Since/If-None-Match for as long as I've known about it
(going back to Varnish 2). Backend conditional requests have been
supported since Varnish 4.
However, by default that doesn't quite work as your flow chart
indicates, if I've understood it correctly. If the client request is
for a cached response with an unelapsed TTL, then Varnish delivers the
cached response unconditionally, without re-validating the response
with the backend. Conditional requests to backends are done for the
fetch after the TTL elapses.
That's the default, but I believe you can get your own VCL to
implement re-validation after cache hits. I haven't tried that myself
-- maybe someone reading the list has some working VCL they can share?
** * * UPLEX - Nils Goroll Systemoptimierung
Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the varnish-misc