limit database cache time to a little more than a day

This commit is contained in:
Matthias Wirth
2020-01-07 20:10:32 +01:00
parent 832b4bda54
commit e2e3d002f8
4 changed files with 4 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ $HTTP["url"] =~ "^/INSTANCE/data/icao_.*\.json$" {
}
$HTTP["url"] =~ "^/INSTANCE/db/.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
"Cache-Control" => "public, max-age=100000",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*\.png$" {

View File

@@ -3097,7 +3097,6 @@ function globeIndexes() {
x1 = -180;
x2 = 180;
}
console.log(y1 + ' ' + y2);
if (y1 < -90)
y1 = -90;
if (y2 > 90)

View File

@@ -33,10 +33,10 @@ location /INSTANCE {
alias HTMLPATH/;
try_files $uri $uri/ =404;
location ~ db/.*\.json$ {
add_header Cache-Control "public, max-age=1209600";
add_header Cache-Control "public, max-age=100000";
}
location ~ .*\.png$ {
add_header Cache-Control "public, max-age=2419200";
add_header Cache-Control "public, max-age=1209600";
}
location ~ .*\.gif$ {
add_header Cache-Control "public, max-age=1209600";

View File

@@ -33,7 +33,7 @@ location / {
alias /usr/local/share/tar1090/html/;
try_files $uri $uri/ =404;
location ~ db/.*\.json$ {
add_header Cache-Control "public, max-age=86400";
add_header Cache-Control "public, max-age=100000";
}
location ~ .*\.png$ {
add_header Cache-Control "public, max-age=1209600";