I think Chris Davies has straightened me out, and that the scenario I describe *is* covered by grace -- that the first hit would also get stale (as well as others in the grace period), which is exactly what I want.<br><br>
<div class="gmail_quote">On Fri, Jan 8, 2010 at 4:20 PM, John Norman <span dir="ltr"><<a href="mailto:john@7fff.com">john@7fff.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi. I've just subscribed, and have been reading through the e-mail archives for varnish-misc.<br><br>In Dec. 2009, Jean-Christophe Petit asked (with subject "still using cache when fetching content"):<br><br>

-----<br>Is it possible to make Varnish sending the cache content at the same <br>time it is fetching from the backend ?<br>It will be more efficient for slow dynamic content ;)<br>For example, I have a php page taking up to 5sec to run. If Varnish was <br>

able to get it while still sending the old cache page, it would be <br>really great.<br>No more unlucky visitor hitting it to update the cache..<br>-----<br><br>There were a couple of replies, but I just wanted to flesh out the "use case":<br>

<br>I think the scenario would be:<br><br>(1) There is a page that takes a very long time to render (say, 90 seconds)<br>(2) It is cached, perhaps to expire after an hour<br>(3) In normal usage, everyone gets the cached page and is very happy <br>

(4) An administrator would like to refresh that page in the cache BEFORE the hour is up; but give any user the earlier cached page<br>(6) The admin would like a mechanism: "Please refresh now with this request, but until the request is finished, serve whatever is in the cache."<br>

<br>This is different from grace, 'cos no one (except the admin) is incurring the wait; and also the admin is asking for a refresh before the cached page has expired.<br><br>Is this a feature that can be simulated in Varnish? Or a feature that might be added at some time?<br>

<br>What we're concerned about is Google's timing of page download. If we set a cache period to, say, an hour, and Google incurs the "first hit" after cache expiry, then it (Google) has to wait for the finished page. In grace mode, requests after the Google hit would get the earlier cached page; but, still, Google has measured the page as taking, say, 60 seconds to download. In the model above, Google would get the cached page; it would just be stale.<br>

<br>Thoughts?<br><font color="#888888"><br>John<br><br>
</font></blockquote></div><br>