precompress database files in tar1090-db

load regCache as a json rather than constructing it from the database
This commit is contained in:
Matthias Wirth
2020-10-22 19:56:09 +02:00
parent f530027dba
commit 2c0822e8af
8 changed files with 120 additions and 55 deletions

View File

@@ -39,33 +39,26 @@ $HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" {
)
}
$HTTP["url"] =~ "^/INSTANCE/data/globe_.*" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, max-age=0",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/traces/" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, max-age=10",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/globe_history/" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, max-age=3600",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/icao_.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=10",
)
}
$HTTP["url"] =~ "^/INSTANCE/db.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*\.png$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=2419200",
@@ -76,12 +69,18 @@ $HTTP["url"] =~ "^/INSTANCE/config.js$" {
"Cache-Control" => "public, must-revalidate",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*_.*\.js$" {
$HTTP["url"] =~ "^/INSTANCE/[^/]*\.js$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/db-.*\.js$" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/ol/.*$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",