Skip to content

feature: expire stale object-store generations from Session caches (TTL/TTI) #7958

Description

@u70b3

Follow-up to #7904 and #7944.

#7944 isolates store-bound vector cache entries (CachedIndexReadersKey, LegacyVectorIndexCacheKey) by object-store identity, so credential rotation produces a cache miss and a rebuild against the current store. However, entries from previous store generations are never proactively invalidated:

Proposed direction

  • Add time-based expiration (TTL or time-to-idle) for the store-bound, identity-keyed entry types, or a generation-aware invalidation hook when a new object-store identity is first seen for a given index UUID.
  • Scope carefully: IvfIndexStateCacheKey, PartitionEntry, and LegacyIVFPartition entries are store-free and intentionally shared across generations — they must not be expired by this mechanism.

Impact today is bounded (moka capacity + weigher accounting), so this is memory/credential-hygiene rather than a correctness issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions