summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-07-05 12:40:26 +0100
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-07-05 12:40:26 +0100
commit7094bcf2518c2676dbf5d5bb5d3e3f28f0d97a45 (patch)
treeeef8b9912655934b675b65b24fac20d10be6fc6c
parentDBG cache (diff)
downloadsynapse-github/rei/synwork_rr_join_flake.tar.xz
-rw-r--r--synapse/util/caches/deferred_cache.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/util/caches/deferred_cache.py b/synapse/util/caches/deferred_cache.py
index c020223586..a91ca04ae1 100644
--- a/synapse/util/caches/deferred_cache.py
+++ b/synapse/util/caches/deferred_cache.py
@@ -315,7 +315,7 @@ class DeferredCache(Generic[KT, VT]):
         self.cache.del_multi(key)
 
         if self.debug_invalidations:
-            logging.debug("Invalidating key %r in cache %s", key)
+            logging.debug("Invalidating key %r in cache", key)
 
         # if we have a pending lookup for this key, remove it from the
         # _pending_deferred_cache, which will (a) stop it being returned
@@ -333,6 +333,8 @@ class DeferredCache(Generic[KT, VT]):
                 entry.invalidate()
 
     def invalidate_all(self) -> None:
+        if self.debug_invalidations:
+            logging.debug("Invalidating ALL keys")
         self.check_thread()
         self.cache.clear()
         for entry in self._pending_deferred_cache.values():