Commit cb076931 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Document grace

Thanks to perbu for suggested documentation
Fixes 355


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3402 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 702b9f26
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment