Skip to content

Commit 0622848

Browse files
committed
Increase some cache times
1 parent 523ff76 commit 0622848

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

modules/actions/serveAutoIndexPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function serveAutoIndexPage(req, res) {
4949

5050
res
5151
.set({
52-
'Cache-Control': 'public,max-age=60', // 1 minute
52+
'Cache-Control': 'public, max-age=600', // 10 minutes
5353
'Cache-Tag': 'auto-index'
5454
})
5555
.send(html);

modules/actions/showStats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function showStats(req, res) {
4848
stats => {
4949
res
5050
.set({
51-
'Cache-Control': 'public, max-age=60',
51+
'Cache-Control': 'public, max-age=3600', // 1 hour
5252
'Cache-Tag': 'stats'
5353
})
5454
.send(stats);

modules/middleware/fetchPackage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function tagRedirect(req, res) {
1111

1212
res
1313
.set({
14-
'Cache-Control': 'public, max-age=300', // 5 minutes
14+
'Cache-Control': 'public, max-age=600', // 10 minutes
1515
'Cache-Tag': 'redirect, tag-redirect'
1616
})
1717
.redirect(
@@ -29,7 +29,7 @@ function semverRedirect(req, res) {
2929
if (maxVersion) {
3030
res
3131
.set({
32-
'Cache-Control': 'public, max-age=300', // 5 minutes
32+
'Cache-Control': 'public, max-age=600', // 10 minutes
3333
'Cache-Tag': 'redirect, semver-redirect'
3434
})
3535
.redirect(

0 commit comments

Comments
 (0)