]> err.no Git - varnish/commit
Enforce a minimum ttl for "hit for pass" objects to prevent a value
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 21 Jan 2009 23:00:43 +0000 (23:00 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 21 Jan 2009 23:00:43 +0000 (23:00 +0000)
commitae3d9827e35926baf01ab96cb3d28c430ad2a38b
tree8c4b8277a01fbb01fd76efa1920341e0a0460121
parent7b8c5ebc15cce4351f9e01a12da50a9fc022e38a
Enforce a minimum ttl for "hit for pass" objects to prevent a value
of zero from serializing access to an object with very draconian
backend cache-control headers.

We could get far even with a one second TTL, but following our general
"there is a reason people put Varnish there in the first place" logic
we use the default_ttl parameter (default: 120 s) for this value.

If another value is desired, this can be set in vcl_fetch, even if it
looks somewhat counter-intuitive:

sub vcl_fetch {
if (obj.http.set-cookie) {
set obj.ttl = 10s;
pass;
}
}

Fixes #425

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3537 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishtest/tests/r00425.vtc [new file with mode: 0644]