diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-17 14:01:06 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-17 14:04:34 +0200 |
commit | 4195cd2bc5046d4cdf1c677c27cd41f427d7a13a (patch) | |
tree | 3300258d96a427da29cc4785686d741e336102bb /server/initializers | |
parent | cff8b272b1631661b8d5f5f4b59bd534ad8c86ca (diff) | |
download | PeerTube-4195cd2bc5046d4cdf1c677c27cd41f427d7a13a.tar.gz PeerTube-4195cd2bc5046d4cdf1c677c27cd41f427d7a13a.tar.zst PeerTube-4195cd2bc5046d4cdf1c677c27cd41f427d7a13a.zip |
Add redis cache to feed route
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 8 |
1 files changed, 8 insertions, 0 deletions
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 = '<!-- open graph and oembed tags -->' | |||
423 | 423 | ||
424 | // --------------------------------------------------------------------------- | 424 | // --------------------------------------------------------------------------- |
425 | 425 | ||
426 | const FEEDS = { | ||
427 | COUNT: 20, | ||
428 | CACHE_LIFETIME: 1000 * 60 * 15 // 15 minutes | ||
429 | } | ||
430 | |||
431 | // --------------------------------------------------------------------------- | ||
432 | |||
426 | // Special constants for a test instance | 433 | // Special constants for a test instance |
427 | if (isTestInstance() === true) { | 434 | if (isTestInstance() === true) { |
428 | ACTOR_FOLLOW_SCORE.BASE = 20 | 435 | ACTOR_FOLLOW_SCORE.BASE = 20 |
@@ -462,6 +469,7 @@ export { | |||
462 | SERVER_ACTOR_NAME, | 469 | SERVER_ACTOR_NAME, |
463 | PRIVATE_RSA_KEY_SIZE, | 470 | PRIVATE_RSA_KEY_SIZE, |
464 | SORTABLE_COLUMNS, | 471 | SORTABLE_COLUMNS, |
472 | FEEDS, | ||
465 | STATIC_MAX_AGE, | 473 | STATIC_MAX_AGE, |
466 | STATIC_PATHS, | 474 | STATIC_PATHS, |
467 | ACTIVITY_PUB, | 475 | ACTIVITY_PUB, |