synapse/tests/storage/databases
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
..
main Fix have_seen_event cache not being invalidated when we persist the event 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