summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-01 10:59:17 +0000
committerErik Johnston <erik@matrix.org>2016-03-01 10:59:17 +0000
commitff2d7551c738ea6138b7bcd245620d91e80841cf (patch)
tree7b1ea01373650f0c87d523ea7f63a2b11584ac11
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/expiring_c... (diff)
downloadsynapse-ff2d7551c738ea6138b7bcd245620d91e80841cf.tar.xz
Correct cache miss detection
-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: