Last active
May 4, 2021 06:27
-
-
Save ryanburnette/4b542f299317b91cdb3b459faf17761b to your computer and use it in GitHub Desktop.
caddy cache strategy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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