Update hybrid cache documentation on tag removal#37277
Merged
Merged
Conversation
Clarifies that RemoveByTagAsync performs logical invalidation rather than physical deletion, and explains what "treated as a cache-miss" means in practice.
wadepickett
reviewed
Jun 22, 2026
wadepickett
reviewed
Jun 22, 2026
|
|
||
| :::code language="csharp" source="~/performance/caching/hybrid/samples/9.x/HCMinimal/Program.cs" id="snippet_getorcreateoptions" highlight="7,17"::: | ||
|
|
||
| Remove all entries for a specified tag by calling <xref:Microsoft.Extensions.Caching.Hybrid.HybridCache.RemoveByTagAsync%2A> with the tag value. An overload lets you specify a collection of tag values. |
Contributor
There was a problem hiding this comment.
These two duplicate paragraphs to the new text above would be removed.
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
Clarified the explanation of tag-based cache entry removal and its logical nature. Updated wording for consistency and clarity.
wadepickett
reviewed
Jun 23, 2026
wadepickett
reviewed
Jun 23, 2026
wadepickett
approved these changes
Jun 23, 2026
Contributor
There was a problem hiding this comment.
@tdykstra,
Approved. I made some very minor suggestions to consider.
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
wadepickett
approved these changes
Jun 23, 2026
wadepickett
left a comment
Contributor
There was a problem hiding this comment.
Approved. (unblocking merge since it blocks if any commits happen after a review approval now).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarifies that RemoveByTagAsync performs logical invalidation rather than physical deletion, and explains what "treated as a cache-miss" means in practice.
Fixes #36757
Why this fits:
It stays in the user-doc / conceptual lane.
It explains “treated as a cache-miss” more clearly.
It avoids getting too deep into implementation internals.
It matches the existing recommendation to revise the paragraph at roughly lines 120–123 in hybrid.md.
Summary
Clarifies the "Remove cache entries by tag" section in the HybridCache article.
The previous wording ("treated as a cache-miss") was unclear about how tag invalidation works in practice. This update explains that invalidation is a logical operation rather than a physical deletion, and that older entries are ignored on read rather than actively removed.
What changed
RemoveByTagAsyncdoes not delete entries from L1 or L2Why
Addresses confusion raised in #36757 about:
Notes
Kept the explanation conceptual (user-doc level), avoiding low-level implementation details.
Internal previews