Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HybridCache.RemoveAsync calls RemoveByTagAsync instead of RemoveAsync #56581

Closed
SeeIfIDont opened this issue Jul 2, 2024 · 4 comments · Fixed by #56719
Closed

HybridCache.RemoveAsync calls RemoveByTagAsync instead of RemoveAsync #56581

SeeIfIDont opened this issue Jul 2, 2024 · 4 comments · Fixed by #56719
Assignees
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-caching Includes: StackExchangeRedis and SqlServer distributed caches

Comments

@SeeIfIDont
Copy link

In the IEnumerable<string> keys overload of HybridCache.RemoveAsync, the single-key case calls through to HybridCache.RemoveByTagAsync(string tag, ...) instead of to HybridCache.RemoveAsync(string key, ...).

This looks like a simple copy/paste error of the IEnumerable<string> tags overload of HybridCache.RemoveByTagAsync, which otherwise looks basically identical.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jul 2, 2024
@javiercn javiercn added feature-caching Includes: StackExchangeRedis and SqlServer distributed caches area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware and removed area-blazor Includes: Blazor, Razor Components labels Jul 3, 2024
@BrennanConroy
Copy link
Member

cc @mgravell

@mgravell
Copy link
Member

well that's just embarrassing - will fix and improve the tests!

@mgravell mgravell self-assigned this Jul 10, 2024
mgravell added a commit that referenced this issue Jul 10, 2024
- RemoveKeyAsync incorrectly calling RemoveByTagAsync
- add Remove tests
- drive-by fix async void tests (probably auto-IDE)
@mgravell
Copy link
Member

one-liner fix: https://github.com/dotnet/aspnetcore/pull/56719/files

@SeeIfIDont
Copy link
Author

well that's just embarrassing - will fix and improve the tests!

I've learned a lot by reading your posts about Redis libraries and the Stack Overflow Tag Engine over the years, so at least the slip-up was on-brand. 🤭 Thanks for the quick fix mate, and thanks for all your work on HybridCache and everything else! 🫡

mgravell added a commit that referenced this issue Jul 10, 2024
- RemoveKeyAsync incorrectly calling RemoveByTagAsync
- add Remove tests
- drive-by fix async void tests (probably auto-IDE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-caching Includes: StackExchangeRedis and SqlServer distributed caches
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants