Caching issue

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Mar 8 09:41:28 CET 2008


In message <47D1CA5A.5050902 at npr.org>, Shain Miley writes:
>I did run varnishlog from the command line without any arguments...it 
>could not reach the webserver because I turned it off...I was hoping to 
>setup varnish in such a way that if the webserver fails...varnish will 
>keep serving pages.
>
>For example: if user A requests index.html and varnish caches it...then 
>5 minutes later user B requests index.html (and varnish still has it in 
>the cache) then it should just serve up the file..without ever going to 
>check the backend.  I know that it might not be the number one intended 
>use for varnish...but that is what I am trying to do...any suggestions?

That's certainly possible, but you need to get it set up right.

By default Varnish will respect whatever the backend says about
caching, and in this case you want to override that.

I don't know if your backend said "do not cache this" or "cache only
15 seconds", but whatever it is, you need to override it in VCL.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list