Grace
Carlos Cima
camcima at hotmail.com
Thu Mar 3 15:33:28 CET 2011
Hi,
Is there any way to check if a particular request was answered "in grace" by sending a HTTP header?
I'm trying to increase the grace period if the user-agent contains "Googlebot" in order to speed up crawling response time and consequently be better positioned in Google organic search results. When I access using Googlebot in the user-agent header I'm not sure if Varnish is waiting for a backend request or not.
VCL excerpt:
sub vcl_recv {
...
# Set Grace
if (req.http.user-agent ~ "Googlebot") {
set req.grace = 12h;
} else {
set req.grace = 30m;
}
...
}
sub vcl_fetch {
...
# Set Grace
set beresp.grace = 12h;
...
}
Thanks,
Carlos Cima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110303/221d0d30/attachment-0003.html>
More information about the varnish-misc
mailing list