From 01ab94aa2796590949659c71a21d1335fb3e036e Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 14 Jun 2021 16:54:09 +0200 Subject: [PATCH] web_svc: improve caching for tiles --- roles/web_svc/templates/tiles_vhost.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/web_svc/templates/tiles_vhost.j2 b/roles/web_svc/templates/tiles_vhost.j2 index 24aaae2..3e489c1 100644 --- a/roles/web_svc/templates/tiles_vhost.j2 +++ b/roles/web_svc/templates/tiles_vhost.j2 @@ -29,8 +29,10 @@ server { proxy_pass http://10.90.224.103/styles/day/$1; proxy_cache tilecache; + proxy_cache_background_update on; + proxy_cache_lock on; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; - proxy_cache_valid 200 1d; + proxy_cache_valid 200 7d; proxy_cache_valid any 1m; proxy_ignore_headers Expires Cache-Control; @@ -42,8 +44,10 @@ server { proxy_pass http://10.90.224.103/styles/night/$1; proxy_cache tilecache; + proxy_cache_background_update on; + proxy_cache_lock on; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; - proxy_cache_valid 200 1d; + proxy_cache_valid 200 7d; proxy_cache_valid any 1m; proxy_ignore_headers Expires Cache-Control;