fix: cache invalidation

This commit is contained in:
Timo Kösters 2023-07-02 22:50:50 +02:00
parent 9d49d599f3
commit bac13d08ae
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB
2 changed files with 53 additions and 31 deletions

View file

@ -387,6 +387,17 @@ impl Service {
self.redact_pdu(redact_id, pdu)?;
}
}
TimelineEventType::SpaceChild => {
if let Some(_state_key) = &pdu.state_key {
services()
.rooms
.spaces
.roomid_spacechunk_cache
.lock()
.unwrap()
.remove(&pdu.room_id);
}
}
TimelineEventType::RoomMember => {
if let Some(state_key) = &pdu.state_key {
#[derive(Deserialize)]