aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/model-cache.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-02-04 15:45:41 +0100
committerChocobozzz <me@florianbigard.com>2020-02-04 15:58:59 +0100
commit943e5193905908dd1f2800d8810c635d86e3b28f (patch)
tree961973733e6e4afb58ac222d2847a3fc4b6d6d60 /server/models/model-cache.ts
parent7eba5e1fa81c8e54cb8fe298a96e8070afa50921 (diff)
downloadPeerTube-943e5193905908dd1f2800d8810c635d86e3b28f.tar.gz
PeerTube-943e5193905908dd1f2800d8810c635d86e3b28f.tar.zst
PeerTube-943e5193905908dd1f2800d8810c635d86e3b28f.zip
Don't refresh videos when processing views
It allows us to use a cache
Diffstat (limited to 'server/models/model-cache.ts')
-rw-r--r--server/models/model-cache.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/model-cache.ts b/server/models/model-cache.ts
index 8afe3834f..a87f99aa2 100644
--- a/server/models/model-cache.ts
+++ b/server/models/model-cache.ts
@@ -6,7 +6,8 @@ type ModelCacheType =
6 'local-account-name' 6 'local-account-name'
7 | 'local-actor-name' 7 | 'local-actor-name'
8 | 'local-actor-url' 8 | 'local-actor-url'
9 | 'video-immutable' 9 | 'load-video-immutable-id'
10 | 'load-video-immutable-url'
10 11
11type DeleteKey = 12type DeleteKey =
12 'video' 13 'video'
@@ -19,7 +20,8 @@ class ModelCache {
19 'local-account-name': new Map(), 20 'local-account-name': new Map(),
20 'local-actor-name': new Map(), 21 'local-actor-name': new Map(),
21 'local-actor-url': new Map(), 22 'local-actor-url': new Map(),
22 'video-immutable': new Map() 23 'load-video-immutable-id': new Map(),
24 'load-video-immutable-url': new Map()
23 } 25 }
24 26
25 private readonly deleteIds: { 27 private readonly deleteIds: {