From 0f1dd9c9525203c7c4fe682f4ce99942344e193b Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 8 Dec 2019 18:52:13 +0000 Subject: [PATCH] tilecache: use conditional validation upstream --- cookbooks/tilecache/templates/default/nginx_tile.conf.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index 07bf8fcd9..6895ea54c 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -225,9 +225,11 @@ server { proxy_cache_use_stale error timeout updating http_500 http_503 http_504; # If in cache as stale, serve stale and update in background proxy_cache_background_update on; + # Enable revalidation using If-Modified-Since and If-None-Match for stale items + proxy_cache_revalidate on; proxy_cache_min_uses 8; - add_header X-Nginx-Cache-Status $upstream_cache_status; + add_header x-cache-status $upstream_cache_status; <% end -%> # Set a QoS cookie if none presented (uses nginx Map) -- 2.43.2