From b1e498d6e1ad674856816bf318fb290646c06556 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 22 Nov 2019 18:39:26 +0000 Subject: [PATCH] Handle prefill --- synapse/util/caches/descriptors.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/util/caches/descriptors.py b/synapse/util/caches/descriptors.py index 3a20efc566..78ebc485dc 100644 --- a/synapse/util/caches/descriptors.py +++ b/synapse/util/caches/descriptors.py @@ -244,6 +244,9 @@ class Cache(object): def prefill(self, key, value, callback=None): callbacks = [callback] if callback else [] + + self.ratio_tracking.add(str(hash(key))) + self.cache.set(key, value, callbacks=callbacks) def invalidate(self, key):