Finish (the "easy") part of degraded mode:
Add req.grace timer: We only serve degraded mode objects if both the
request and the object's grace timers are satisfied.
Sort expiry list on obj.ttl + obj.grace and fiddle list if either changes.
In the hash lookup: record if any objects still in grace by obj.grace which
match our Vary: criteria (if any).
If no in-ttl object was found AND we have a graced object AND it is also
graced by req.grace AND it is being fetched: serve the graced object.
Otherwise, mark us as successor to the graced object while we fetch to
give others the chance.
When we unbusy the object, clean the magic pointers between the two
objects again.
To play with this you need at least:
sub vcl_recv {
set req.grace = 2m;
}
sub vcl_fetch {
set obj.grace = 2m;
}
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2392
d4fa192b-c00b-0410-8231-
f00ffab90ce4