Cache external display metadata with explicit freshness #40

Open
opened 2026-11-01 20:11:57 +00:00 by viacheslavshuka · 0 comments

External tournament display and search requests can reuse stale-tolerant metadata. Identity verification must still establish the current external profile state.

Scope

Add bounded caching to the rating-data adapter's display and search reads. Choose and document lifetimes, invalidation, and failure behavior. Do not introduce Redis or unrelated statistics precomputation.

Acceptance criteria

  • Repeated equivalent display/search reads can reuse stored metadata within the selected lifetime. Keys distinguish relevant query inputs and result variants.
  • Metadata carries enough freshness information to enforce expiry. Expired and missing entries follow a documented refresh or stale-display policy.
  • An upstream error cannot silently turn stale display data into verified current data. The caller receives the freshness or failure state needed by its interface.
  • Identity verification bypasses stale display caches and requires a successful current external lookup. An old verification marker in cached metadata cannot prove a new verification.
  • Negative or failed lookups cannot remain cached indefinitely. The selected policy permits corrected external data to become visible.
  • Cache storage and refresh remain bounded. Concurrent refreshes do not corrupt entries. Multiple workers obey the documented freshness behavior.
  • No cache becomes authority for capacity, moderation, permissions, or linked-account identity.

Validation

Use a controlled upstream adapter and clock to check hit, miss, expiry, changed external data, upstream failure, and concurrent refresh. Demonstrate that a cached old verification marker cannot satisfy a new identity check.

Dependencies

External tournament display and search requests can reuse stale-tolerant metadata. Identity verification must still establish the current external profile state. ## Scope Add bounded caching to the rating-data adapter's display and search reads. Choose and document lifetimes, invalidation, and failure behavior. Do not introduce Redis or unrelated statistics precomputation. ## Acceptance criteria - Repeated equivalent display/search reads can reuse stored metadata within the selected lifetime. Keys distinguish relevant query inputs and result variants. - Metadata carries enough freshness information to enforce expiry. Expired and missing entries follow a documented refresh or stale-display policy. - An upstream error cannot silently turn stale display data into verified current data. The caller receives the freshness or failure state needed by its interface. - Identity verification bypasses stale display caches and requires a successful current external lookup. An old verification marker in cached metadata cannot prove a new verification. - Negative or failed lookups cannot remain cached indefinitely. The selected policy permits corrected external data to become visible. - Cache storage and refresh remain bounded. Concurrent refreshes do not corrupt entries. Multiple workers obey the documented freshness behavior. - No cache becomes authority for capacity, moderation, permissions, or linked-account identity. ## Validation Use a controlled upstream adapter and clock to check hit, miss, expiry, changed external data, upstream failure, and concurrent refresh. Demonstrate that a cached old verification marker cannot satisfy a new identity check. ## Dependencies - [#37: Attribute groups to registered and unregistered authors](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/37). Author search provides the player-display lookup contract. - [#38: Link reusable groups to tournaments without duplicating testing history](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/38). Tournament selection provides the tournament-display lookup contract. ## Related work - [#27: Complete registration through verified rating-profile control](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/27)
Sign in to join this conversation.
No description provided.