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 cache not removed by tag #58857

Closed
1 task done
mrazvanalex opened this issue Nov 10, 2024 · 2 comments
Closed
1 task done

HybridCache cache not removed by tag #58857

mrazvanalex opened this issue Nov 10, 2024 · 2 comments
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-caching Includes: StackExchangeRedis and SqlServer distributed caches ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@mrazvanalex
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

HybridCache RemoveByTagAsync is not removing cache with certain tag when using MemoryCache

Expected Behavior

When running the controller method again, the cache should reset and get new data from myService because the cache should be removed for "identifier" as it has the tag "test" .

The cache is not removed.

Steps To Reproduce

Controller Method

           var tags = new List<string> { id.ToString() };
            var entryOptions = new HybridCacheEntryOptions
            {
                Expiration = TimeSpan.FromMinutes(1),
                LocalCacheExpiration = TimeSpan.FromMinutes(1)
            };

            var result = await _cache.GetOrCreateAsync($"identifier", async get =>
            {
                var result = await _myService.GetData();
                return result;
            }, entryOptions, tags);

Trying to remove cache entry:
` await _cache.RemoveByTagAsync(id.ToString());

Yes, I confirmed that the GUID is the same.

Exceptions (if any)

.NET Version

9.0.100-rc.2.24474.11

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Nov 10, 2024
@BrennanConroy
Copy link
Member

I don't think it's implemented yet.

Tracked by #55308

@BrennanConroy BrennanConroy added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Nov 10, 2024
@gfoidl gfoidl added feature-caching Includes: StackExchangeRedis and SqlServer distributed caches area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Nov 11, 2024
Copy link
Contributor

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-caching Includes: StackExchangeRedis and SqlServer distributed caches ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

3 participants