mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-09-24 07:15:07 -05:00
use stale-while-revalidate to cache less agressively
This commit is contained in:
@@ -23,13 +23,13 @@ in
|
||||
"/" = {
|
||||
root = "${website}/public";
|
||||
extraConfig = ''
|
||||
add_header Cache-Control "max-age=${toString (minutes 15)}";
|
||||
add_header Cache-Control "max-age=${toString (minutes 5)}, stale-while-revalidate=${toString (minutes 15)}";
|
||||
'';
|
||||
};
|
||||
"/assets/" = {
|
||||
root = "${website}/public";
|
||||
extraConfig = ''
|
||||
add_header Cache-Control "max-age=${toString (days 30)}";
|
||||
add_header Cache-Control "max-age=${toString (hours 1)}, stale-while-revalidate=${toString (days 30)}";
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ in
|
||||
root = themes;
|
||||
extraConfig = ''
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Cache-Control "max-age=${days 30}";
|
||||
add_header Cache-Control "max-age=${days 1}, stale-while-revalidate=${days 30}";
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user