aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-29 15:20:36 +0200
committerChocobozzz <me@florianbigard.com>2019-07-29 15:20:36 +0200
commitcd4cb177e6e35f69832304366c6f9df96600fb9e (patch)
tree4936951477b39cd471b8a70c96bf79a951d2c6ba /server/initializers/constants.ts
parentc928e1364fbdff87f27fd982710b95426a250491 (diff)
downloadPeerTube-cd4cb177e6e35f69832304366c6f9df96600fb9e.tar.gz
PeerTube-cd4cb177e6e35f69832304366c6f9df96600fb9e.tar.zst
PeerTube-cd4cb177e6e35f69832304366c6f9df96600fb9e.zip
Improve static files cache
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 40f86a30d..5fe7d416c 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -500,7 +500,10 @@ const STATIC_DOWNLOAD_PATHS = {
500} 500}
501 501
502// Cache control 502// Cache control
503let STATIC_MAX_AGE = '2h' 503let STATIC_MAX_AGE = {
504 SERVER: '2h',
505 CLIENT: '30d'
506}
504 507
505// Videos thumbnail size 508// Videos thumbnail size
506const THUMBNAILS_SIZE = { 509const THUMBNAILS_SIZE = {
@@ -604,7 +607,7 @@ if (isTestInstance() === true) {
604 REMOTE_SCHEME.HTTP = 'http' 607 REMOTE_SCHEME.HTTP = 'http'
605 REMOTE_SCHEME.WS = 'ws' 608 REMOTE_SCHEME.WS = 'ws'
606 609
607 STATIC_MAX_AGE = '0' 610 STATIC_MAX_AGE.SERVER = '0'
608 611
609 ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE = 2 612 ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE = 2
610 ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL = 10 * 1000 // 10 seconds 613 ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL = 10 * 1000 // 10 seconds