Increase some cache times
This commit is contained in:
parent
523ff7647f
commit
0622848255
|
@ -49,7 +49,7 @@ function serveAutoIndexPage(req, res) {
|
||||||
|
|
||||||
res
|
res
|
||||||
.set({
|
.set({
|
||||||
'Cache-Control': 'public,max-age=60', // 1 minute
|
'Cache-Control': 'public, max-age=600', // 10 minutes
|
||||||
'Cache-Tag': 'auto-index'
|
'Cache-Tag': 'auto-index'
|
||||||
})
|
})
|
||||||
.send(html);
|
.send(html);
|
||||||
|
|
|
@ -48,7 +48,7 @@ function showStats(req, res) {
|
||||||
stats => {
|
stats => {
|
||||||
res
|
res
|
||||||
.set({
|
.set({
|
||||||
'Cache-Control': 'public, max-age=60',
|
'Cache-Control': 'public, max-age=3600', // 1 hour
|
||||||
'Cache-Tag': 'stats'
|
'Cache-Tag': 'stats'
|
||||||
})
|
})
|
||||||
.send(stats);
|
.send(stats);
|
||||||
|
|
|
@ -11,7 +11,7 @@ function tagRedirect(req, res) {
|
||||||
|
|
||||||
res
|
res
|
||||||
.set({
|
.set({
|
||||||
'Cache-Control': 'public, max-age=300', // 5 minutes
|
'Cache-Control': 'public, max-age=600', // 10 minutes
|
||||||
'Cache-Tag': 'redirect, tag-redirect'
|
'Cache-Tag': 'redirect, tag-redirect'
|
||||||
})
|
})
|
||||||
.redirect(
|
.redirect(
|
||||||
|
@ -29,7 +29,7 @@ function semverRedirect(req, res) {
|
||||||
if (maxVersion) {
|
if (maxVersion) {
|
||||||
res
|
res
|
||||||
.set({
|
.set({
|
||||||
'Cache-Control': 'public, max-age=300', // 5 minutes
|
'Cache-Control': 'public, max-age=600', // 10 minutes
|
||||||
'Cache-Tag': 'redirect, semver-redirect'
|
'Cache-Tag': 'redirect, semver-redirect'
|
||||||
})
|
})
|
||||||
.redirect(
|
.redirect(
|
||||||
|
|
Loading…
Reference in New Issue