summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-11-22 18:39:26 +0000
committerErik Johnston <erik@matrix.org>2019-11-22 18:39:26 +0000
commitb1e498d6e1ad674856816bf318fb290646c06556 (patch)
treef01471543119a01b4f5e9fa59677f96f355829cd
parentTrack cache hit ratios (diff)
downloadsynapse-erikj/cache_tracking.tar.xz
Handle prefill erikj/cache_tracking
-rw-r--r--synapse/util/caches/descriptors.py3
1 files changed, 3 insertions, 0 deletions
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):