mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 17:56:19 +03:00
Handle prefill
This commit is contained in:
parent
9cca5ee743
commit
b1e498d6e1
1 changed files with 3 additions and 0 deletions
|
@ -244,6 +244,9 @@ class Cache(object):
|
||||||
|
|
||||||
def prefill(self, key, value, callback=None):
|
def prefill(self, key, value, callback=None):
|
||||||
callbacks = [callback] if callback else []
|
callbacks = [callback] if callback else []
|
||||||
|
|
||||||
|
self.ratio_tracking.add(str(hash(key)))
|
||||||
|
|
||||||
self.cache.set(key, value, callbacks=callbacks)
|
self.cache.set(key, value, callbacks=callbacks)
|
||||||
|
|
||||||
def invalidate(self, key):
|
def invalidate(self, key):
|
||||||
|
|
Loading…
Reference in a new issue