diff options
author | Erik Johnston <erik@matrix.org> | 2018-03-01 15:30:57 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-03-01 17:08:17 +0000 |
commit | 33bebb63f34aa947a9a48920589cd63d27f1235c (patch) | |
tree | 5fd38456ee5da398b453bc43b35c03e6bce87bc5 /synapse/storage/account_data.py | |
parent | Merge pull request #2920 from matrix-org/erikj/retry_send_event (diff) | |
download | synapse-33bebb63f34aa947a9a48920589cd63d27f1235c.tar.xz |
Add some caches to help read marker API
Diffstat (limited to 'synapse/storage/account_data.py')
-rw-r--r-- | synapse/storage/account_data.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/account_data.py b/synapse/storage/account_data.py index 466194e96f..c062e03d13 100644 --- a/synapse/storage/account_data.py +++ b/synapse/storage/account_data.py @@ -133,6 +133,7 @@ class AccountDataWorkerStore(SQLBaseStore): for row in rows }) + @cached(num_args=2) def get_account_data_for_room(self, user_id, room_id): """Get all the client account_data for a user for a room. @@ -310,6 +311,7 @@ class AccountDataStore(AccountDataWorkerStore): self._account_data_stream_cache.entity_has_changed(user_id, next_id) self.get_account_data_for_user.invalidate((user_id,)) + self.get_account_data_for_room.invalidate((user_id, room_id,)) result = self._account_data_id_gen.get_current_token() defer.returnValue(result) |