Replace DeferredCache with LruCache where possible (#8563)

Most of these uses don't need a full-blown DeferredCache; LruCache is lighter and more appropriate.
This commit is contained in:
Richard van der Hoff 2020-10-19 12:20:29 +01:00 committed by GitHub
parent 79c1f973ce
commit 97647b33c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 27 deletions

View file

@ -1051,9 +1051,7 @@ class PersistEventsStore:
def prefill():
for cache_entry in to_prefill:
self.store._get_event_cache.prefill(
(cache_entry[0].event_id,), cache_entry
)
self.store._get_event_cache.set((cache_entry[0].event_id,), cache_entry)
txn.call_after(prefill)