Refetch new page according to result?

Simon Lyall simon at darkmere.gen.nz
Mon Mar 14 03:36:39 CET 2011


This looks impossible but I thought I'd ask.

The idea I had was that the cache could fetch a page and according to the 
result fetch another page an serve that to the user.

So I could look for a 301 and if the 301 pointed to my domain I could 
refetch the new URL and deliver that content (without giving the user a 
301).

However going through the docs this appears to be impossible since I won't 
know the result of the backend call until vcl_fetch or vcl_deliver and 
neither of these give me the option to go back to vcl_recv

This is for archived pages, so the app would check the archive status 
early in the transaction and just return a quick pointer to the archive 
url (which might be just flat file on disk) which varnish could grab,
serve and cache forever with the user not being redirected.

-- 
Simon Lyall  |  Very Busy  |  Web: http://www.darkmere.gen.nz/
"To stay awake all night adds a day to your life" - Stilgar | eMT.





More information about the varnish-misc mailing list