aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 7fac8a4d6..7a3ec3874 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -660,7 +660,7 @@ const EMBED_SIZE = {
660} 660}
661 661
662// Sub folders of cache directory 662// Sub folders of cache directory
663const CACHE = { 663const FILES_CACHE = {
664 PREVIEWS: { 664 PREVIEWS: {
665 DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'previews'), 665 DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'previews'),
666 MAX_AGE: 1000 * 3600 * 3 // 3 hours 666 MAX_AGE: 1000 * 3600 * 3 // 3 hours
@@ -671,6 +671,12 @@ const CACHE = {
671 } 671 }
672} 672}
673 673
674const CACHE = {
675 USER_TOKENS: {
676 MAX_SIZE: 10000
677 }
678}
679
674const HLS_STREAMING_PLAYLIST_DIRECTORY = join(CONFIG.STORAGE.STREAMING_PLAYLISTS_DIR, 'hls') 680const HLS_STREAMING_PLAYLIST_DIRECTORY = join(CONFIG.STORAGE.STREAMING_PLAYLISTS_DIR, 'hls')
675const HLS_REDUNDANCY_DIRECTORY = join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls') 681const HLS_REDUNDANCY_DIRECTORY = join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls')
676 682
@@ -741,7 +747,7 @@ if (isTestInstance() === true) {
741 747
742 JOB_ATTEMPTS['email'] = 1 748 JOB_ATTEMPTS['email'] = 1
743 749
744 CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000 750 FILES_CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000
745 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1 751 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1
746 ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0ms' 752 ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0ms'
747 753
@@ -759,7 +765,7 @@ export {
759 ACCEPT_HEADERS, 765 ACCEPT_HEADERS,
760 BCRYPT_SALT_SIZE, 766 BCRYPT_SALT_SIZE,
761 TRACKER_RATE_LIMITS, 767 TRACKER_RATE_LIMITS,
762 CACHE, 768 FILES_CACHE,
763 CONFIG, 769 CONFIG,
764 CONSTRAINTS_FIELDS, 770 CONSTRAINTS_FIELDS,
765 EMBED_SIZE, 771 EMBED_SIZE,
@@ -799,6 +805,7 @@ export {
799 VIDEO_TRANSCODING_FPS, 805 VIDEO_TRANSCODING_FPS,
800 FFMPEG_NICE, 806 FFMPEG_NICE,
801 VIDEO_ABUSE_STATES, 807 VIDEO_ABUSE_STATES,
808 CACHE,
802 JOB_REQUEST_TIMEOUT, 809 JOB_REQUEST_TIMEOUT,
803 USER_PASSWORD_RESET_LIFETIME, 810 USER_PASSWORD_RESET_LIFETIME,
804 MEMOIZE_TTL, 811 MEMOIZE_TTL,