diff options
author | Erik Johnston <erik@matrix.org> | 2016-03-01 10:59:17 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-03-01 10:59:17 +0000 |
commit | ff2d7551c738ea6138b7bcd245620d91e80841cf (patch) | |
tree | 7b1ea01373650f0c87d523ea7f63a2b11584ac11 /synapse/util | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/expiring_c... (diff) | |
download | synapse-ff2d7551c738ea6138b7bcd245620d91e80841cf.tar.xz |
Correct cache miss detection
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/caches/expiringcache.py | 2 |
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: |