Now I have this for caching
(caching) {
header {
Cache-Control "public, max-age=604800, must-revalidate"
}
}
I am not sure, but should I also insert this below. I do not want to duplicate caching, if the one above do similar things. If I should use them both, how to insert “expires” into “caching” snippet?
expires {
match some/path/.*.css$ 1y # expires
css files in some/path after one year
match .js$ 1m # expires
js files after 30 days
match .png$ 1d # expires
png files after one day
match .jpg$ 1h # expires
jpg files after one hour
match .pdf$ 1i # expires
pdf file after one minute
match .txt$ 1s # expires
txt files after one second
match .html$ 5i30s # expires
html files after 5 minutes 30 seconds
}