diff options
author | Erik Johnston <erik@matrix.org> | 2019-11-22 18:39:26 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-11-22 18:39:26 +0000 |
commit | b1e498d6e1ad674856816bf318fb290646c06556 (patch) | |
tree | f01471543119a01b4f5e9fa59677f96f355829cd /synapse | |
parent | Track cache hit ratios (diff) | |
download | synapse-b1e498d6e1ad674856816bf318fb290646c06556.tar.xz |
Handle prefill github/erikj/cache_tracking erikj/cache_tracking
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/util/caches/descriptors.py | 3 |
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): |