Hi. You should match against req.http.host, not req.url.
Consider using grace mode too in order to achieve what you want. Regards, Thierry -------- Message d'origine -------- De : Tim Dunphy Date :10/11/2014 05:31 (GMT+01:00) A : [email protected] Objet : cache site for 1 hour 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<http://pool.sks-keyservers.net> --recv-keys F186197B
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
