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. > https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests?version=8
That > 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? Best, Geoff -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstraße 32 22301 Hamburg Tel +49 40 2880 5731 Mob +49 176 636 90917 Fax +49 40 42949753 http://uplex.de
signature.asc
Description: OpenPGP digital signature
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
