From cd4cb177e6e35f69832304366c6f9df96600fb9e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Jul 2019 15:20:36 +0200 Subject: Improve static files cache --- server/initializers/constants.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server/initializers/constants.ts') 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 = { } // Cache control -let STATIC_MAX_AGE = '2h' +let STATIC_MAX_AGE = { + SERVER: '2h', + CLIENT: '30d' +} // Videos thumbnail size const THUMBNAILS_SIZE = { @@ -604,7 +607,7 @@ if (isTestInstance() === true) { REMOTE_SCHEME.HTTP = 'http' REMOTE_SCHEME.WS = 'ws' - STATIC_MAX_AGE = '0' + STATIC_MAX_AGE.SERVER = '0' ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE = 2 ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL = 10 * 1000 // 10 seconds -- cgit v1.2.3