[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: nginx: hydra.gnu.org: Keep things in cache for 7 days.
From: |
Ludovic Courtès |
Subject: |
01/01: nginx: hydra.gnu.org: Keep things in cache for 7 days. |
Date: |
Wed, 16 Mar 2016 13:38:24 +0000 |
civodul pushed a commit to branch master
in repository maintenance.
commit ba374db7689f0df83666619a76f5e43d9adfe1fc
Author: Ludovic Courtès <address@hidden>
Date: Wed Mar 16 14:35:23 2016 +0100
nginx: hydra.gnu.org: Keep things in cache for 7 days.
---
hydra/nginx/hydra.gnu.org-locations.conf | 6 +++---
hydra/nginx/hydra.gnu.org.conf | 10 +++++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/hydra/nginx/hydra.gnu.org-locations.conf
b/hydra/nginx/hydra.gnu.org-locations.conf
index a93af3e..5ed6da2 100644
--- a/hydra/nginx/hydra.gnu.org-locations.conf
+++ b/hydra/nginx/hydra.gnu.org-locations.conf
@@ -19,7 +19,7 @@ location /nar/ {
# Enable caching for nar files, to avoid reconstructing and recompressing
# archives.
proxy_cache nar;
- proxy_cache_valid 200 72h; # cache hits for 3 days.
+ proxy_cache_valid 200 8d; # cache hits for 8 days.
proxy_cache_valid any 1m; # cache misses/others for 1 min.
proxy_ignore_client_abort on;
@@ -45,7 +45,7 @@ location ~ /(nix-cache-info|static|logo|favicon\.ico) {
# Cache this file since that's always the first thing we ask for.
proxy_cache static;
- proxy_cache_valid 200 100h; # cache hits for a looong time.
+ proxy_cache_valid 200 10d; # cache hits for a looong time.
proxy_cache_valid any 5m; # cache misses/others for 5 min.
proxy_ignore_client_abort on;
@@ -63,7 +63,7 @@ location ~ \.narinfo$ {
# Enable caching for narinfo files, to avoid recomputing nar signatures.
proxy_cache narinfo;
- proxy_cache_valid 200 18h; # cache hits for 18 hours.
+ proxy_cache_valid 200 7d; # cache hits for 7 days.
proxy_cache_valid any 1m; # cache misses/others for 1 min.
proxy_ignore_client_abort on;
diff --git a/hydra/nginx/hydra.gnu.org.conf b/hydra/nginx/hydra.gnu.org.conf
index 6d7fdaa..5dc42a2 100644
--- a/hydra/nginx/hydra.gnu.org.conf
+++ b/hydra/nginx/hydra.gnu.org.conf
@@ -34,24 +34,28 @@ http {
keepalive_timeout 65;
+ # The 'inactive' parameter for caching is not very useful in our
+ # case: all that matters is that LRU sweeping happens when
+ # 'max_size' is hit.
+
# cache for narinfo files
proxy_cache_path /var/cache/nginx/narinfo
levels=2
- inactive=9h # inactive keys removed after 9h
+ inactive=7d # inactive keys removed after 7d
keys_zone=narinfo:4m # narinfo meta data: ~32K keys
max_size=2g; # total cache data size max
# cache for nar files
proxy_cache_path /var/cache/nginx/nar
levels=2
- inactive=48h # inactive keys removed after 48h
+ inactive=8d # inactive keys removed after 8d
keys_zone=nar:4m # nar cache meta data: ~32K keys
max_size=20g; # total cache data size max
# cache for static data
proxy_cache_path /var/cache/nginx/static
levels=1
- inactive=48h # inactive keys removed after 2 days
+ inactive=10d # inactive keys removed after 10d
keys_zone=static:1m # nar cache meta data: ~8K keys
max_size=200m; # total cache data size max