synapse/tests/storage/databases/main
Eric Eastwood dd4be2453f Fix have_seen_event cache not being invalidated when we persist the event
Fix for
https://github.com/matrix-org/synapse/issues/13856

Fixed by calling `_invalidate_caches_for_event`
when we persist an event.

And an additional fix in `_invalidate_caches_for_event`
to make sure it uses the correct cache key. This seems
like it would be an easy foot-gun for any `tree=True`
cache.

Wrong:
```py
self.have_seen_event.invalidate((room_id, event_id))
```

Correct:
```py
self.have_seen_event.invalidate(((room_id, event_id),))
```
2022-09-21 15:45:08 -05:00
..
__init__.py add a cache to have_seen_event (#9953) 2021-06-01 12:04:47 +01:00
test_deviceinbox.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
test_events_worker.py Fix have_seen_event cache not being invalidated when we persist the event 2022-09-21 15:45:08 -05:00
test_lock.py LockStore: fix acquiring a lock via LockStore.try_acquire_lock (#12832) 2022-05-30 09:41:13 +01:00
test_room.py Implement MSC3827: Filtering of /publicRooms by room type (#13031) 2022-06-29 17:12:45 +00:00