PERF: add some minimal caching to javascripts folder

This commit is contained in:
Sam 2018-01-09 12:38:15 +11:00
parent ea63abf0f7
commit 6e70065291
1 changed files with 7 additions and 0 deletions

View File

@ -107,6 +107,13 @@ server {
break;
}
# some minimal caching here so we don't keep asking
# longer term we should increas probably to 1y
location ~ ^/javascripts/ {
expires 1d;
add_header Cache-Control public,immutable;
}
location ~ ^/assets/(?<asset_path>.+)$ {
expires 1y;
# asset pipeline enables this