summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-07 19:26:54 +0100
committerErik Johnston <erik@matrix.org>2015-08-07 19:26:54 +0100
commit2352974aab49862252652d3d69ac1b16e930da7c (patch)
tree0f24f5bf20e5f752a95e5161ff63b0b082b37c5b /synapse/storage
parentMerge branch 'erikj/cache_deferreds' of github.com:matrix-org/synapse into er... (diff)
parents/observed/observer/ (diff)
downloadsynapse-2352974aab49862252652d3d69ac1b16e930da7c.tar.xz
Merge branch 'erikj/cache_deferreds' of github.com:matrix-org/synapse into erikj/cache_varargs_interface
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/_base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index e1f29a3aca..a088a6175c 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -184,7 +184,7 @@ class CacheDescriptor(object):
             try:
                 cached_result_d = self.cache.get(keyargs)
 
-                observed = cached_result_d.observe()
+                observer = cached_result_d.observe()
                 if DEBUG_CACHES:
                     @defer.inlineCallbacks
                     def check_result(cached_result):
@@ -197,9 +197,9 @@ class CacheDescriptor(object):
                             )
                             raise ValueError("Stale cache entry")
                         defer.returnValue(cached_result)
-                    observed.addCallback(check_result)
+                    observer.addCallback(check_result)
 
-                return observed
+                return observer
             except KeyError:
                 # Get the sequence number of the cache before reading from the
                 # database so that we can tell if the cache is invalidated