aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-03-11 14:39:28 +0100
committerChocobozzz <me@florianbigard.com>2020-03-11 15:02:20 +0100
commit764a965778ac89e027fd05dd35697c6763e0dc18 (patch)
treeecc18834566b940c729a57b5bf0d088e894f03d3 /server/initializers/constants.ts
parentfab6746354f9d9cb65c35d8bd9352c4b773b4c69 (diff)
downloadPeerTube-764a965778ac89e027fd05dd35697c6763e0dc18.tar.gz
PeerTube-764a965778ac89e027fd05dd35697c6763e0dc18.tar.zst
PeerTube-764a965778ac89e027fd05dd35697c6763e0dc18.zip
Implement pagination for overviews endpoint
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 8b040aa2c..13448ffed 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -90,9 +90,6 @@ const ROUTE_CACHE_LIFETIME = {
90 SECURITYTXT: '2 hours', 90 SECURITYTXT: '2 hours',
91 NODEINFO: '10 minutes', 91 NODEINFO: '10 minutes',
92 DNT_POLICY: '1 week', 92 DNT_POLICY: '1 week',
93 OVERVIEWS: {
94 VIDEOS: '1 hour'
95 },
96 ACTIVITY_PUB: { 93 ACTIVITY_PUB: {
97 VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example 94 VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example
98 }, 95 },
@@ -446,7 +443,7 @@ MIMETYPES.IMAGE.EXT_MIMETYPE = invert(MIMETYPES.IMAGE.MIMETYPE_EXT)
446const OVERVIEWS = { 443const OVERVIEWS = {
447 VIDEOS: { 444 VIDEOS: {
448 SAMPLE_THRESHOLD: 6, 445 SAMPLE_THRESHOLD: 6,
449 SAMPLES_COUNT: 2 446 SAMPLES_COUNT: 20
450 } 447 }
451} 448}
452 449
@@ -687,8 +684,8 @@ if (isTestInstance() === true) {
687 JOB_ATTEMPTS['email'] = 1 684 JOB_ATTEMPTS['email'] = 1
688 685
689 FILES_CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000 686 FILES_CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000
690 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1 687 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 3000
691 ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0ms' 688 OVERVIEWS.VIDEOS.SAMPLE_THRESHOLD = 2
692} 689}
693 690
694updateWebserverUrls() 691updateWebserverUrls()