summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-05 16:45:56 +0100
committerErik Johnston <erik@matrix.org>2015-08-05 16:45:56 +0100
commit3e1b77efc2fe4ef952a3914e01176ec2f283ca89 (patch)
tree270134b419c3d9c3caea0a95660c0af91a0ea550 /synapse/storage/state.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary... (diff)
parentAdd support for using keyword arguments with cached functions (diff)
downloadsynapse-3e1b77efc2fe4ef952a3914e01176ec2f283ca89.tar.xz
Merge branch 'erikj/cached_keyword_args' of github.com:matrix-org/synapse into erikj/dictionary_cache
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index a967b3d44b..48a4023558 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from ._base import SQLBaseStore, cached
+from ._base import SQLBaseStore, cached, cachedInlineCallbacks
 
 from twisted.internet import defer
 
@@ -176,8 +176,7 @@ class StateStore(SQLBaseStore):
         events = yield self._get_events(event_ids, get_prev_content=False)
         defer.returnValue(events)
 
-    @cached(num_args=3)
-    @defer.inlineCallbacks
+    @cachedInlineCallbacks(num_args=3)
     def get_current_state_for_key(self, room_id, event_type, state_key):
         def f(txn):
             sql = (