diff --git a/crates/matrix-sdk/src/event_cache/mod.rs b/crates/matrix-sdk/src/event_cache/mod.rs index cc0ac6d14f4..dfe2df5a671 100644 --- a/crates/matrix-sdk/src/event_cache/mod.rs +++ b/crates/matrix-sdk/src/event_cache/mod.rs @@ -312,6 +312,11 @@ impl EventCache { events: Vec, prev_batch: Option, ) -> Result<()> { + // If the event cache's storage has been enabled, do nothing. + if self.inner.store.get().is_some() { + return Ok(()); + } + let room_cache = self.inner.for_room(room_id).await?; // We could have received events during a previous sync; remove them all, since