This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change
1
+ Improve performance of sending events for worker-based deployments using Redis.
Original file line number Diff line number Diff line change @@ -1050,19 +1050,20 @@ async def cache_joined_hosts_for_event(
1050
1050
)
1051
1051
1052
1052
if state_entry .state_group :
1053
+ await self ._external_cache .set (
1054
+ "event_to_prev_state_group" ,
1055
+ event .event_id ,
1056
+ state_entry .state_group ,
1057
+ expiry_ms = 60 * 60 * 1000 ,
1058
+ )
1059
+
1053
1060
if state_entry .state_group in self ._external_cache_joined_hosts_updates :
1054
1061
return
1055
1062
1056
1063
joined_hosts = await self .store .get_joined_hosts (event .room_id , state_entry )
1057
1064
1058
1065
# Note that the expiry times must be larger than the expiry time in
1059
1066
# _external_cache_joined_hosts_updates.
1060
- await self ._external_cache .set (
1061
- "event_to_prev_state_group" ,
1062
- event .event_id ,
1063
- state_entry .state_group ,
1064
- expiry_ms = 60 * 60 * 1000 ,
1065
- )
1066
1067
await self ._external_cache .set (
1067
1068
"get_joined_hosts" ,
1068
1069
str (state_entry .state_group ),
You can’t perform that action at this time.
0 commit comments