Skip to content

Commit

Permalink
Do not cache static query data
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmithbaylor authored Aug 12, 2020
1 parent bfe9ce5 commit 3c7fe1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/gatsby-plugin-netlify/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ export const SECURITY_HEADERS = {
}

export const IMMUTABLE_CACHING_HEADER = `Cache-Control: public, max-age=31536000, immutable`
const NO_CACHING_HEADER = `Cache-Control: public, max-age=0, must-revalidate`

export const CACHING_HEADERS = {
"/static/*": [IMMUTABLE_CACHING_HEADER],
"/static/d/*": [NO_CACHING_HEADER],
"/sw.js": [`Cache-Control: no-cache`],
}

Expand Down

0 comments on commit 3c7fe1a

Please sign in to comment.