[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: nginx: mirror: Cache nars for 30 days only.
From: |
Ludovic Courtès |
Subject: |
02/03: nginx: mirror: Cache nars for 30 days only. |
Date: |
Mon, 28 Aug 2017 09:17:06 -0400 (EDT) |
civodul pushed a commit to branch master
in repository maintenance.
commit ebf446a8542556d32b0c27f7821f29fd27b8b3f5
Author: Ludovic Courtès <address@hidden>
Date: Mon Aug 28 15:14:56 2017 +0200
nginx: mirror: Cache nars for 30 days only.
* hydra/nginx/mirror-locations.conf (/nar): Cache 200 responses for 30
days. Remove 'proxy_cache_valid' directory for 504.
---
hydra/nginx/mirror-locations.conf | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hydra/nginx/mirror-locations.conf
b/hydra/nginx/mirror-locations.conf
index 34ab3f9..882e9bc 100644
--- a/hydra/nginx/mirror-locations.conf
+++ b/hydra/nginx/mirror-locations.conf
@@ -35,12 +35,13 @@ location ~ /nar/ {
proxy_read_timeout 60s;
proxy_send_timeout 60s;
- # Enable caching for nar files, to avoid reconstructing and recompressing
- # archives.
+ # XXX: If builds were all bit-reproducible, we could cache nars
+ # much longer. However they are not, so we can end up with hash
+ # mismatches between the narinfos and the cached nars we have.
+ # Thus, cache for a limited amount of time.
proxy_cache nar;
- proxy_cache_valid 200 91d; # cache hits for 3 months.
- proxy_cache_valid 504 3m; # timeout, when hydra.gnu.org is overloaded
- proxy_cache_valid any 20m; # cache misses/others for 20m
+ proxy_cache_valid 200 30d; # cache hits for 1 month
+ proxy_cache_valid any 5m; # others for 5m
proxy_ignore_client_abort on;