[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: nginx: Cache narinfos for a shorter amount of time on mirrors.
From: |
Ludovic Courtès |
Subject: |
01/01: nginx: Cache narinfos for a shorter amount of time on mirrors. |
Date: |
Fri, 28 Oct 2016 19:45:42 +0000 (UTC) |
civodul pushed a commit to branch master
in repository maintenance.
commit caaeb7bea3515e7ef45e33e5e75674f7b72c2f06
Author: Ludovic Courtès <address@hidden>
Date: Fri Oct 28 21:40:06 2016 +0200
nginx: Cache narinfos for a shorter amount of time on mirrors.
---
hydra/nginx/mirror-locations.conf | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hydra/nginx/mirror-locations.conf
b/hydra/nginx/mirror-locations.conf
index 9fc9e34..e1f8a59 100644
--- a/hydra/nginx/mirror-locations.conf
+++ b/hydra/nginx/mirror-locations.conf
@@ -69,8 +69,12 @@ location ~ \.narinfo$ {
proxy_send_timeout 2s;
# Enable caching for narinfo files, to avoid recomputing nar signatures.
+ #
+ # Note: Avoid caching narinfos for too long to avoid a situation
+ # where we have the narinfo but don't have the corresponding nar
+ # and cannot have it.
proxy_cache narinfo;
- proxy_cache_valid 200 90d; # cache hits for 3 months.
+ proxy_cache_valid 200 30d; # cache hits for 1 month
proxy_cache_valid 504 5m; # timeout, when hydra.gnu.org is overloaded
proxy_cache_valid any 1h; # cache misses/others for 1h.