summaryrefslogtreecommitdiffstats
path: root/roles/varnish
diff options
context:
space:
mode:
authorAdrian Reber <adrian@lisas.de>2015-06-12 08:13:17 +0000
committerAdrian Reber <adrian@lisas.de>2015-06-12 16:09:14 +0000
commit408935f8267875db53549077b01d174312f09926 (patch)
tree2622ec83b52dc424ed3f7097aa724ca65efe1e66 /roles/varnish
parenta55526bcafd76c9b74bf4d76dd18ef82c79a7bdd (diff)
downloadansible-408935f8267875db53549077b01d174312f09926.tar.gz
ansible-408935f8267875db53549077b01d174312f09926.tar.xz
ansible-408935f8267875db53549077b01d174312f09926.zip
Increase cache time for mirrorlist
The mirrorlist which can be viewed in the browser used to be generated once or twice per day with MM1. This is listed is now cached in varnish but only for two minutes. This patch increases the cache time to 6 hours. Also increase cache time for the static mirrormanager content.
Diffstat (limited to 'roles/varnish')
-rw-r--r--roles/varnish/files/proxy.vcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/varnish/files/proxy.vcl b/roles/varnish/files/proxy.vcl
index 0fd5aa620..464a75468 100644
--- a/roles/varnish/files/proxy.vcl
+++ b/roles/varnish/files/proxy.vcl
@@ -303,5 +303,9 @@ sub vcl_recv {
sub vcl_backend_response {
if (bereq.url ~ "^/mirrormanager/mirrors") {
unset beresp.http.set-cookie;
+ set beresp.ttl = 6h;
+ }
+ if (bereq.url ~ "^/mirrormanager/static/") {
+ set beresp.ttl = 6h;
}
}