Skip to content

Instantly share code, notes, and snippets.

@ryanburnette
Last active May 4, 2021 06:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburnette/4b542f299317b91cdb3b459faf17761b to your computer and use it in GitHub Desktop.
Save ryanburnette/4b542f299317b91cdb3b459faf17761b to your computer and use it in GitHub Desktop.
caddy cache strategy
(asset-paths) {
path *.bmp *.jpg *.png *.svg *.gif *.pdf *.css *.js
}
(cache) {
@content {
not {
import asset-paths
}
}
header @content cache-control max-age=0
@assets {
import asset-paths
}
header @assets cache-control max-age=31536000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment