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

Redis distributed cache: add HybridCache usage signal #59543

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgravell
Copy link
Member

@mgravell mgravell commented Dec 18, 2024

We already use "DC" and "OC" markers on RESP connections to provide a non-intrusive signal that Distributed Cache and Output Cache are being used; since HybridCache is a feature on top of IDistributedCache, here we add an additional "HC" token to indicate that a RESP connection is being used for HybridCache.

We do this by using IServiceProvider (changing the internal RedisCacheImpl(...) constructors) to detect HybridCache as a service. We don't need it to be the official HybridCache specifically (as in .AddHybridCache()) - just that a HybridCache exists. There are no public API or dependency changes required.

Note: we will also want to backport this

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware label Dec 18, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants