diff options
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index c4e8522c2..cfa0203d2 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -42,6 +42,13 @@ const OAUTH_LIFETIME = { | |||
42 | REFRESH_TOKEN: 1209600 // 2 weeks | 42 | REFRESH_TOKEN: 1209600 // 2 weeks |
43 | } | 43 | } |
44 | 44 | ||
45 | const ROUTE_CACHE_LIFETIME = { | ||
46 | FEEDS: 1000 * 60 * 15, // 15 minutes | ||
47 | ACTIVITY_PUB: { | ||
48 | VIDEOS: 1000 * 5 // 5 seconds | ||
49 | } | ||
50 | } | ||
51 | |||
45 | // --------------------------------------------------------------------------- | 52 | // --------------------------------------------------------------------------- |
46 | 53 | ||
47 | // Number of points we add/remove after a successful/bad request | 54 | // Number of points we add/remove after a successful/bad request |
@@ -413,8 +420,7 @@ const OPENGRAPH_AND_OEMBED_COMMENT = '<!-- open graph and oembed tags -->' | |||
413 | // --------------------------------------------------------------------------- | 420 | // --------------------------------------------------------------------------- |
414 | 421 | ||
415 | const FEEDS = { | 422 | const FEEDS = { |
416 | COUNT: 20, | 423 | COUNT: 20 |
417 | CACHE_LIFETIME: 1000 * 60 * 15 // 15 minutes | ||
418 | } | 424 | } |
419 | 425 | ||
420 | // --------------------------------------------------------------------------- | 426 | // --------------------------------------------------------------------------- |
@@ -458,6 +464,7 @@ export { | |||
458 | FOLLOW_STATES, | 464 | FOLLOW_STATES, |
459 | SERVER_ACTOR_NAME, | 465 | SERVER_ACTOR_NAME, |
460 | PRIVATE_RSA_KEY_SIZE, | 466 | PRIVATE_RSA_KEY_SIZE, |
467 | ROUTE_CACHE_LIFETIME, | ||
461 | SORTABLE_COLUMNS, | 468 | SORTABLE_COLUMNS, |
462 | FEEDS, | 469 | FEEDS, |
463 | NSFW_POLICY_TYPES, | 470 | NSFW_POLICY_TYPES, |