diff options
author | Erik Johnston <erik@matrix.org> | 2021-05-07 14:54:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 14:54:09 +0100 |
commit | 6c847785494473c0a430f368a0d79c9202b8ddd0 (patch) | |
tree | 19186423e77a7f52d8480fbdf0e7faec45d90a09 /synapse | |
parent | Fix make_full_schema to create the db with the right options and user (#9931) (diff) | |
download | synapse-6c847785494473c0a430f368a0d79c9202b8ddd0.tar.xz |
Always cache 'event_to_prev_state_group' (#9950)
Fixes regression in send PDU times introduced in #9905.
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/message.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 8729332d4b..5afb7fc261 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -1050,6 +1050,13 @@ class EventCreationHandler: ) if state_entry.state_group: + await self._external_cache.set( + "event_to_prev_state_group", + event.event_id, + state_entry.state_group, + expiry_ms=60 * 60 * 1000, + ) + if state_entry.state_group in self._external_cache_joined_hosts_updates: return @@ -1058,12 +1065,6 @@ class EventCreationHandler: # Note that the expiry times must be larger than the expiry time in # _external_cache_joined_hosts_updates. await self._external_cache.set( - "event_to_prev_state_group", - event.event_id, - state_entry.state_group, - expiry_ms=60 * 60 * 1000, - ) - await self._external_cache.set( "get_joined_hosts", str(state_entry.state_group), list(joined_hosts), |