-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[release/9.0] Redis distributed cache: add HybridCache usage signal #59886
base: release/9.0
Are you sure you want to change the base?
Conversation
Hi, how does this signal tweak the connection? For example with FusionCache it's totally possible to use RedisCache in our apps without being forced to use that as the L2 of FusionCache, even when using it via the HybridCache adapter: in this case the checks I see here would not be technically "correct". Can a false detection create problems? Thanks. |
Tactics requested; approved 2025-01-24 |
Test failures seem to be build/SDK related: Xunit.Sdk.EqualException: Assert.Equal() Failure |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Backport of #59543 to release/9.0
/cc @mgravell
Redis distributed cache: add HybridCache usage signal
Add connection usage marker for
HybridCache
to improve connection metadata / visibility.Description
{Detail}
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.
Customer Impact
Improves connection metadata / visibility, i.e. we know what different Redis connections are being used for.
No API changes. Improves internal metrics.
Regression?
[If yes, specify the version the behavior has regressed from]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
When servicing release/2.1