summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-03-01 17:12:34 +0000
committerGitHub <noreply@github.com>2018-03-01 17:12:34 +0000
commit9e08a93a7bc1f7b8e0ab46663ae759490ddcbccf (patch)
treeaa29b5ba7f771c42595ee3a5ed79761e86a8e7ac /synapse/storage/events.py
parentMerge pull request #2926 from matrix-org/erikj/member_handler_move (diff)
parentFewer lies are better (diff)
downloadsynapse-9e08a93a7bc1f7b8e0ab46663ae759490ddcbccf.tar.xz
Merge pull request #2927 from matrix-org/erikj/read_marker_caches
Improve caching for read_marker API
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index b63392a6cd..057b1be4d5 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -28,7 +28,7 @@ from synapse.util.logutils import log_function
 from synapse.util.metrics import Measure
 from synapse.api.constants import EventTypes
 from synapse.api.errors import SynapseError
-from synapse.util.caches.descriptors import cached
+from synapse.util.caches.descriptors import cached, cachedInlineCallbacks
 from synapse.types import get_domain_from_id
 
 from canonicaljson import encode_canonical_json
@@ -2033,7 +2033,7 @@ class EventsStore(EventsWorkerStore):
         to_2, so_2 = yield self._get_event_ordering(event_id2)
         defer.returnValue((to_1, so_1) > (to_2, so_2))
 
-    @defer.inlineCallbacks
+    @cachedInlineCallbacks(max_entries=5000)
     def _get_event_ordering(self, event_id):
         res = yield self._simple_select_one(
             table="events",