cache site for 1 hour

Tim Dunphy bluethundr at gmail.com
Mon Nov 10 05:30:48 CET 2014


Hey guys,

 I'm trying to keep a copy of the site I'm working on in cache for 1 hour.
My goal is to be able to stop the web server(s) completely, and have the
site served from cache in a worst case scenario.

 So I tried adding the following vcl_fetch to my default.vcl file expecting
this to be a success. But when I stop the web server the site immediately
disappears with a GURU Meditation error showing in the web browser:

sub vcl_fetch {

   if ( req.url ~ "^www\.ref\.mydomain\.com$") {
   set beresp.ttl = 3600s;
   }

    return (deliver);
}


I'd definitely appreciate any advice you'd have!

Thanks
Tim
-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20141109/733dc24f/attachment.html>


More information about the varnish-misc mailing list