Switch over /events to use per room caches

This commit is contained in:
Erik Johnston 2016-02-01 16:26:51 +00:00
parent 2d3837bec7
commit 4bf448be25
2 changed files with 22 additions and 7 deletions

View file

@ -39,7 +39,6 @@ from ._base import SQLBaseStore
from synapse.util.caches.descriptors import cachedInlineCallbacks
from synapse.api.constants import EventTypes
from synapse.types import RoomStreamToken
from synapse.util.logutils import log_function
import logging
@ -288,11 +287,12 @@ class StreamStore(SQLBaseStore):
get_prev_content=True
)
self._set_before_and_after(ret, rows, topo_order=False)
return ret
return self.runInteraction("get_room_changes_for_user", f)
@log_function
def get_room_events_stream(
self,
user_id,