From: Martin Zobel-Helas Date: Fri, 25 Jan 2013 23:34:46 +0000 (+0100) Subject: cache everything X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e2f365fb8101fece9130d2a8fdcaefc1293f51bc;p=mirror%2Fdsa-puppet.git cache everything Signed-off-by: Martin Zobel-Helas --- diff --git a/modules/varnish/files/default.vcl b/modules/varnish/files/default.vcl index 66ff13aa1..6e87911ad 100644 --- a/modules/varnish/files/default.vcl +++ b/modules/varnish/files/default.vcl @@ -32,12 +32,7 @@ sub vcl_recv { } - if (req.request == "GET" && req.url ~ "^/search?") { - return(pass); - } - if (req.request == "GET" && req.url ~ "^/(squeeze|wheezy|sid|experimental|stable|testing|unstable|rc-buggy|squeezy-backports|lenny-backports|Pics)/") { - return(lookup); - } + return(lookup); } sub vcl_fetch { @@ -49,23 +44,10 @@ sub vcl_fetch { set beresp.ttl = 600s; set beresp.grace = 600s; - if (beresp.status == 404) { - set beresp.ttl = 0s; - } - if (beresp.status >= 500) { set beresp.ttl = 0s; } - if (req.request == "GET" && req.url ~ "^/search?") { - set beresp.ttl = 0s; - } - - if (req.request == "GET" && req.url ~ "^/(squeeze|wheezy|sid|experimental|stable|testing|unstable|rc-buggy|squeezy-backports|lenny-backports|Pics)/") { - set beresp.ttl = 3600s; - } - - set beresp.http.X-Cacheable = "YES"; return(deliver); }