still using cache when fetching content

Tollef Fog Heen tfheen at redpill-linpro.com
Tue Dec 1 08:27:48 CET 2009


]] Jean-Christophe Petit 

| Is it possible to make Varnish sending the cache content at the same 
| time it is fetching from the backend ?

Not at the moment, no.

| It will be more efficient for slow dynamic content ;)
| For example, I have a php page taking up to 5sec to run. If Varnish was 
| able to get it while still sending the old cache page, it would be 
| really great.

You could trick this by having a script that revisits any URLs that are
slow every N minutes and set obj.ttl to 0s in vcl_hit if the user agent
(or IP address) is what you expect for your script.  Might not work if
you have many different URLs, though.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73



More information about the varnish-misc mailing list