summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/util/caches/expiringcache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/caches/expiringcache.py b/synapse/util/caches/expiringcache.py
index 138cbefff4..55ba1c08c0 100644
--- a/synapse/util/caches/expiringcache.py
+++ b/synapse/util/caches/expiringcache.py
@@ -79,7 +79,7 @@ class ExpiringCache(object):
         try:
             entry = self._cache[key]
             cache_counter.inc_hits(self._cache_name)
-        finally:
+        except KeyError:
             cache_counter.inc_misses(self._cache_name)
 
         if self._reset_expiry_on_get: