Skip to content

Commit 2bec71c

Browse files
Guerra24aparcar
authored andcommitted
feat(cache): revalidate cache
To prevent mismatches between indexes and packages. Valid time for 200 responses has been reduced to 1 minute. Squid used 0 seconds but with that setting Nginx does not cache the response. Signed-off-by: Lili González <lili@guerra24.net>
1 parent 9e2de7a commit 2bec71c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

misc/nginx-cache.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ server {
4545
proxy_set_header Accept-Encoding "";
4646

4747
proxy_cache packages;
48-
proxy_cache_valid 200 7d;
48+
proxy_cache_valid 200 1m;
4949
proxy_cache_valid 404 1m;
50+
proxy_cache_revalidate on;
5051
proxy_cache_use_stale error timeout updating;
5152
proxy_cache_lock on;
5253
proxy_cache_key $upstream_host$upstream_path;

0 commit comments

Comments
 (0)