forked from carbon-design-system/carbon-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcache.conf
More file actions
33 lines (27 loc) · 731 Bytes
/
cache.conf
File metadata and controls
33 lines (27 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Gatsby caching recommendations: https://www.gatsbyjs.org/docs/caching/
## No-cache
location ~* \.html$ {
add_header Cache-Control "public, max-age=0, must-revalidate";
expires off;
}
location /page-data {
add_header Cache-Control "public, max-age=0, must-revalidate";
expires off;
}
location /sw.js {
add_header Cache-Control "public, max-age=0, must-revalidate";
expires off;
}
location /search_index.json {
add_header Cache-Control "public, max-age=0, must-revalidate";
expires off;
}
## Cache
location /static {
add_header Cache-Control "public, max-age=31536000, immutable";
expires 1y;
}
location ~* \.(js|css)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
expires 1y;
}