Skip to content
Snippets Groups Projects
Unverified Commit 6c847785 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Always cache 'event_to_prev_state_group' (#9950)

Fixes regression in send PDU times introduced in #9905.
parent 76547356
No related branches found
No related tags found
No related merge requests found
Improve performance of sending events for worker-based deployments using Redis.
......@@ -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
......@@ -1057,12 +1064,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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment