From: tfheen Date: Tue, 18 Nov 2008 20:53:03 +0000 (+0000) Subject: Document grace X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64e4476143acda15579ea5284516488840e739ea;p=varnish Document grace Thanks to perbu for suggested documentation Fixes 355 git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3402 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/man/vcl.7so b/varnish-cache/man/vcl.7so index 84ff8a10..03c2acb3 100644 --- a/varnish-cache/man/vcl.7so +++ b/varnish-cache/man/vcl.7so @@ -186,6 +186,24 @@ if (client.ip ~ local) { pipe; } .Ed +.Ss Grace +If the backend takes a long time to generate an object there is a risk +of a thread pile up. +In order to prevent this you can enable grace. +This allows varnish to serve an expired version of the object while a +fresh object is being generated by the backend. +.Pp +The following vcl code will make Varnish serve expired objects. +All object will be kept up to two minutes past their expiration time +or a fresh object is generated. +.Bd -literal -offset 4n +sub vcl_recv { + set req.grace = 2m; +} +sub vcl_fetch { + set obj.grace = 2m; +} +.Ed .Ss Functions The following built-in functions are available: .Bl -tag -width indent