From 4195cd2bc5046d4cdf1c677c27cd41f427d7a13a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Apr 2018 14:01:06 +0200 Subject: Add redis cache to feed route --- server/initializers/constants.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/initializers/constants.ts') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 56d39529e..9fde989c5 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -423,6 +423,13 @@ const OPENGRAPH_AND_OEMBED_COMMENT = '' // --------------------------------------------------------------------------- +const FEEDS = { + COUNT: 20, + CACHE_LIFETIME: 1000 * 60 * 15 // 15 minutes +} + +// --------------------------------------------------------------------------- + // Special constants for a test instance if (isTestInstance() === true) { ACTOR_FOLLOW_SCORE.BASE = 20 @@ -462,6 +469,7 @@ export { SERVER_ACTOR_NAME, PRIVATE_RSA_KEY_SIZE, SORTABLE_COLUMNS, + FEEDS, STATIC_MAX_AGE, STATIC_PATHS, ACTIVITY_PUB, -- cgit v1.2.3