Skip to content

feat(tags): tag-based cache invalidation#280

Open
singulared wants to merge 1 commit into
nextfrom
tag-invalidation
Open

feat(tags): tag-based cache invalidation#280
singulared wants to merge 1 commit into
nextfrom
tag-invalidation

Conversation

@singulared
Copy link
Copy Markdown
Member

Adds passive tag-based invalidation modeled on FusionCache: cache entries carry a set of tags, backends store invalidation timestamps per tag, and on read the FSM compares per-tag timestamps against the entry's creation time. No tag→keys index, no eager eviction — entries are treated as expired when any of their tags has a newer invalidation timestamp.

FSM integration runs request-side tag invalidation prefetch in parallel with the cache read, attaches response-side tags at write time, and short-circuits the parallel fetch when no tags are configured (zero overhead for non-tag flows).

Includes BDD coverage for invalidation behavior and backend-level tag round-trip / invalidate / invalidated tests across Moka, FeOxDb, and Redis.

Adds passive tag-based invalidation modeled on FusionCache: cache
entries carry a set of tags, backends store invalidation timestamps
per tag, and on read the FSM compares per-tag timestamps against the
entry's creation time. No tag→keys index, no eager eviction — entries
are treated as expired when any of their tags has a newer invalidation
timestamp.

FSM integration runs request-side tag invalidation prefetch in
parallel with the cache read, attaches response-side tags at write
time, and short-circuits the parallel fetch when no tags are
configured (zero overhead for non-tag flows).

Includes BDD coverage for invalidation behavior and backend-level tag
round-trip / invalidate / invalidated tests across Moka, FeOxDb, and
Redis.
@singulared singulared requested a review from AndreyErmilov May 5, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant