diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-02-11 15:01:15 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-02-11 15:01:15 +0000 |
commit | f5a70e0d2e890adea53b3f6565a3bbe92512a506 (patch) | |
tree | 945af3ac6ec84a8f8b1ec1f0df502168f0d7e5e5 /synapse/storage/__init__.py | |
parent | Add a lru cache class (diff) | |
download | synapse-f5a70e0d2e890adea53b3f6565a3bbe92512a506.tar.xz |
Add a cache for get_event
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index a63c59a8a2..1170d8b6ec 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -164,6 +164,9 @@ class DataStore(RoomMemberStore, RoomStore, stream_ordering=None, is_new_state=True, current_state=None): + # Remove the any existing cache entries for the event_id + self._get_event_cache.pop(event.event_id) + # We purposefully do this first since if we include a `current_state` # key, we *want* to update the `current_state_events` table if current_state: |