is the
following VCL the correct solution to support browser shift-reloads to
get fresh content and actually update the cache?
sub vcl_hit {
if (req.http.Cache-Control ~ no-cache) {
set obj.ttl = 0s;
pass;
}
}
Only kind-of; IE and Mozilla send different things with
in vcl_recv, we shortcut and send such requests straight to lookup:
/* Honour Cache-Control: and Pragma: ... */
if (req.http.Pragma ~ .*no-cache.* || req.http.Cache-Control ~
.*no-cache.*) {
lookup;
}
...and then in vcl_recv we do similar to you:
Bother, of course I
Using latest varnish from FreeBSD ports (version 1.1.2), is the
following VCL the correct solution to support browser shift-reloads to
get fresh content and actually update the cache?
sub vcl_hit {
if (req.http.Cache-Control ~ no-cache) {
set obj.ttl = 0s;
pass;
}
}