From e8ddab92c92283c878eb0b41f9c2ed271a2fadc3 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sun, 21 Mar 2021 14:13:34 +0100 Subject: [PATCH] reduce cache lifetime for traces --- 88-tar1090.conf | 2 +- nginx.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/88-tar1090.conf b/88-tar1090.conf index da78cad..bce3f4d 100644 --- a/88-tar1090.conf +++ b/88-tar1090.conf @@ -49,7 +49,7 @@ $HTTP["url"] =~ "^/INSTANCE/data/globe.*" { $HTTP["url"] =~ "^/INSTANCE/data/traces/" { compress.filetype = () setenv.add-response-header += ( - "Cache-Control" => "public, max-age=10", + "Cache-Control" => "public, max-age=2", "Content-Encoding" => "gzip", ) } diff --git a/nginx.conf b/nginx.conf index 7ecdc66..cd9bf13 100644 --- a/nginx.conf +++ b/nginx.conf @@ -7,12 +7,12 @@ location /INSTANCE/data/ { location /INSTANCE/data/traces/ { location ~ trace_recent { gzip off; - add_header Cache-Control "public, max-age=5"; + add_header Cache-Control "private, max-age=2"; add_header Content-Encoding "gzip"; } location ~ trace_full { gzip off; - add_header Cache-Control "public, max-age=200"; + add_header Cache-Control "private, max-age=2"; add_header Content-Encoding "gzip"; } }