[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: hydra: bayfront: Aggressively cache versioned package pages.
From: |
Ludovic Courtès |
Subject: |
03/03: hydra: bayfront: Aggressively cache versioned package pages. |
Date: |
Mon, 18 Dec 2023 09:01:58 -0500 (EST) |
civodul pushed a commit to branch master
in repository maintenance.
commit 48a62d76c6b95e0696fa528a7c17ec9ae724a8e1
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Dec 18 15:01:06 2023 +0100
hydra: bayfront: Aggressively cache versioned package pages.
* hydra/bayfront.scm (%packages.guix.gnu.org-nginx-servers): Add block
for /packages/.*/[0-9].*.
---
hydra/bayfront.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index 0ae6187..a63ee46 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -879,6 +879,17 @@ proxy_set_header Via $via;"
"proxy_http_version 1.1;"
"proxy_set_header Connection \"\";")))
(list
+ (nginx-location-configuration
+ ;; Cache URLs such as /packages/openmpi/4.1.6 aggressively since, by
+ ;; definition, they rarely change.
+ (uri "~ /packages/.*/[0-9].*")
+ (body `(,@base
+ "proxy_cache static;"
+ "proxy_cache_valid 200 24h;" ;cache aggressively
+ "proxy_cache_valid any 5m;" ;cache misses/others for 5 min
+
+ "add_header Cache-Control max-age=43200;")))
+
(nginx-location-configuration
(uri "/packages")
(body `(,@base