mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-06 19:37:55 +00:00
The event, chain position, chain link and state map caches lived on the Rust `StateResolutionHandler`, each a `SizedLru` of its own. The Rust sync handler will read the event and state group caches too, so they move to the Rust `Store`, which the main datastore builds and every Rust handler borrows. They are now `Cache`s in the runtime's registry, so age-based expiry, cache factors and metrics come with that rather than being re-implemented, and `SizedLru` goes. `EventsWorkerStore` now empties them through the store (`RustStore. invalidate_event` and `clear_event_cache`) rather than through the state res handler, so they are kept in step with the Python event cache on every database, and the conflict cache is the one cache the handler still owns. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194eNQP5weBtVMg8NKtc6VU