Decrease CDN cache time to 10 mins

Fixes #186
This commit is contained in:
Michael Jackson
2019-07-03 14:32:32 -07:00
parent 90473733a5
commit aded6f9dbc
2 changed files with 15 additions and 9 deletions

View File

@ -10,7 +10,7 @@ function tagRedirect(req, res) {
res
.set({
'Cache-Control': 'public, s-maxage=14400, max-age=3600', // 4 hours on CDN, 1 hour on clients
'Cache-Control': 'public, s-maxage=600, max-age=60', // 10 mins on CDN, 1 min on clients
'Cache-Tag': 'redirect, tag-redirect'
})
.redirect(
@ -28,7 +28,7 @@ function semverRedirect(req, res) {
if (maxVersion) {
res
.set({
'Cache-Control': 'public, s-maxage=14400, max-age=3600', // 4 hours on CDN, 1 hour on clients
'Cache-Control': 'public, s-maxage=600, max-age=60', // 10 mins on CDN, 1 min on clients
'Cache-Tag': 'redirect, semver-redirect'
})
.redirect(