mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
ops: Tweak nginx cache to avoid returning stale data
This commit is contained in:
parent
968080ca26
commit
0a7b0cd710
2 changed files with 9 additions and 7 deletions
|
|
@ -1,12 +1,15 @@
|
|||
# proxy cache
|
||||
proxy_cache_path /var/cache/nginx/services keys_zone=services:200m levels=1:2 inactive=30d max_size=200m;
|
||||
proxy_cache_path /var/cache/nginx/apihot keys_zone=apihot:200m levels=1:2 inactive=60m max_size=20m;
|
||||
proxy_cache_path /var/cache/nginx/apiwarm keys_zone=apiwarm:200m levels=1:2 inactive=24h max_size=200m;
|
||||
proxy_cache_path /var/cache/nginx/apinormal keys_zone=apinormal:500m levels=1:2 inactive=24h max_size=2000m;
|
||||
|
||||
proxy_cache_path /var/cache/nginx/esplorahot keys_zone=esplorahot:200m levels=1:2 inactive=1m max_size=200m;
|
||||
proxy_cache_path /var/cache/nginx/apihot keys_zone=apihot:200m levels=1:2 inactive=30m max_size=200m;
|
||||
proxy_cache_path /var/cache/nginx/apiwarm keys_zone=apiwarm:200m levels=1:2 inactive=4h max_size=200m;
|
||||
|
||||
proxy_cache_path /var/cache/nginx/apinormal keys_zone=apinormal:500m levels=1:2 inactive=7d max_size=2000m;
|
||||
proxy_cache_path /var/cache/nginx/apicold keys_zone=apicold:200m levels=1:2 inactive=60d max_size=2000m;
|
||||
|
||||
proxy_cache_path /var/cache/nginx/unfurler keys_zone=unfurler:200m levels=1:2 inactive=30d max_size=2000m;
|
||||
proxy_cache_path /var/cache/nginx/sipper keys_zone=sipper:500m levels=1:2 inactive=60d max_size=5000m;
|
||||
proxy_cache_path /var/cache/nginx/sipper keys_zone=sipper:500m levels=1:2 inactive=60d max_size=2000m;
|
||||
|
||||
types_hash_max_size 8192;
|
||||
|
||||
|
|
|
|||
|
|
@ -180,9 +180,8 @@ location @esplora-api-cache-minimal {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_cache_background_update on;
|
||||
proxy_cache_use_stale updating;
|
||||
proxy_cache apihot;
|
||||
proxy_cache_use_stale error;
|
||||
proxy_cache esplorahot;
|
||||
proxy_cache_valid 200 1s;
|
||||
proxy_redirect off;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue