Skip to content

Redis distributed cache: add HybridCache usage signal - #59543

Merged
mgravell merged 1 commit into
mainfrom
marc/redis-dc-hc-marker
Jan 15, 2025
Merged

mgravell merged 1 commit into
mainfrom
marc/redis-dc-hc-marker

Conversation

@mgravell

@mgravell mgravell commented Dec 18, 2024 •

Copy link
Copy Markdown
Contributor

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

@ghost ghost added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label Dec 18, 2024
@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Dec 26, 2024
@mgravell

Copy link
Copy Markdown
Contributor Author

/azp run

@dotnet-policy-service dotnet-policy-service Bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Dec 26, 2024
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 3, 2025
@mgravell

mgravell commented Jan 9, 2025

Copy link
Copy Markdown
Contributor Author

/azp run

@dotnet-policy-service dotnet-policy-service Bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 9, 2025
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@mgravell

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@mgravell
mgravell merged commit c4c8d3a into main Jan 15, 2025
@mgravell
mgravell deleted the marc/redis-dc-hc-marker branch January 15, 2025 16:08
@dotnet-policy-service dotnet-policy-service Bot added this to the 10.0-preview1 milestone Jan 15, 2025
@mgravell

Copy link
Copy Markdown
Contributor Author

/backport to release/9.0

@github-actions

Copy link
Copy Markdown
Contributor

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 middlewares

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants