Files
synapse/rust/src/storage
Erik JohnstonandClaude Opus 5.5 ce84ed1e66 Give the Rust cache a secondary index, touch, and lazy auth IDs
Preparation for making the Rust event cache the one `EventsWorkerStore`
reads through.

- `Cache::new_indexed` keeps the keys grouped by a value-derived index key,
  maintained on every insert and removal path, and `invalidate_index` drops
  one group. A room purge invalidates the event cache by room, and
  retention runs that for every room with a policy, so it must not walk
  the whole cache.
- `Cache::touch` marks an entry as read without cloning it,
  `get_or_count_miss` and `get_uncounted` cover the metrics cases of
  Python's `update_metrics`, and `count_miss` records a miss found
  elsewhere.
- `CachedEvent` works out its auth event IDs on first use. An event filled
  from Python is usually never read by state resolution, so it should not
  pay to parse them. `auth_event_ids` is fallible now, and its callers in
  state resolution propagate the error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VpBQxvqZTUvHCMm3u6CR7J
2026-10-15 12:14:53 +00:00
..
2026-10-14 15:11:51 +00:00
2026-10-14 15:11:51 +00:00
2026-10-14 15:11:51 +00:00