grace scenario - app side and varnish

John Norman john at
Tue Jan 12 23:00:21 CET 2010


I'm having a dickens of a time triggering "grace" mode.

Varnish version 2.0.6.

I am using a director.

On my app server, the expiration is set to, e.g.,

Cache-Control: max-age=10, public

I would like to set "grace" in Varnish so that this stays in the cache
for some long amount of time, and then when I hit the site, I get
stale content (no wait), and the backend gets triggered to refresh the

It would seem that all I should have to do is set req.grace = 1m; at
the top of vcl_recv (or for sections that go to "lookup"), and in
vcl_fetch, set obj.grace = 1m.

Then in the period between +10 seconds and 1m, I should see that
behavior -- getting stale data, but seeing Varnish go to my backend
app server to get new content?


More information about the varnish-misc mailing list