1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Cache AP video route for 5 seconds

This commit is contained in:
Chocobozzz 2018-05-11 09:44:04 +02:00
parent 8a2db2e8cb
commit fd4484f19e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 42 additions and 30 deletions

View file

@ -42,6 +42,13 @@ const OAUTH_LIFETIME = {
REFRESH_TOKEN: 1209600 // 2 weeks
}
const ROUTE_CACHE_LIFETIME = {
FEEDS: 1000 * 60 * 15, // 15 minutes
ACTIVITY_PUB: {
VIDEOS: 1000 * 5 // 5 seconds
}
}
// ---------------------------------------------------------------------------
// 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 -->'
// ---------------------------------------------------------------------------
const FEEDS = {
COUNT: 20,
CACHE_LIFETIME: 1000 * 60 * 15 // 15 minutes
COUNT: 20
}
// ---------------------------------------------------------------------------
@ -458,6 +464,7 @@ export {
FOLLOW_STATES,
SERVER_ACTOR_NAME,
PRIVATE_RSA_KEY_SIZE,
ROUTE_CACHE_LIFETIME,
SORTABLE_COLUMNS,
FEEDS,
NSFW_POLICY_TYPES,