From 3a98ca704c8f4e4c1d678b1dabfa374b1cf82868 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 22 Jan 2026 17:53:44 -0600 Subject: [PATCH] When purging room history, send `cache` replication message for `_get_event_cache` As described in https://github.com/element-hq/synapse-rust-apps/issues/157 --- synapse/storage/databases/main/purge_events.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/storage/databases/main/purge_events.py b/synapse/storage/databases/main/purge_events.py index d55ea5cf7d..4aa5d1e135 100644 --- a/synapse/storage/databases/main/purge_events.py +++ b/synapse/storage/databases/main/purge_events.py @@ -401,6 +401,11 @@ class PurgeEventsStore(StateGroupWorkerStore, CacheInvalidationWorkerStore): for event_id, should_delete in event_rows: if should_delete: self.invalidate_get_event_cache_after_txn(txn, event_id) + # Send that invalidation to replication so that other workers also invalidate + # the event cache. + self._send_invalidation_to_replication( + txn, "_get_event_cache", (event_id,) + ) logger.info("[purge] done")