Skip to content

Caching SERedis critical bugfix; defer HC metadata detection because of DI cycle - #60915

Merged
mgravell merged 1 commit into
mainfrom
marc/hc_di_fix
Mar 13, 2025
Merged

Caching SERedis critical bugfix; defer HC metadata detection because of DI cycle#60915
mgravell merged 1 commit into
mainfrom
marc/hc_di_fix

Conversation

@mgravell

@mgravell mgravell commented Mar 13, 2025

Copy link
Copy Markdown
Contributor

Caching SERedis critical bugfix; defer HC metadata detection because of DI cycle

fix #60894

Existing HybridCache metadata detection can create a DI cycle, infinite loop and eventual stack-overflow

Fix this by deferring detection until after construction.

Workaround for now is simply not to use 9.0.3:

- <PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.3" />
+ <PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.2" />

@ghost ghost added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Mar 13, 2025
@mgravell

Copy link
Copy Markdown
Contributor Author

/backport to release/9.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/13836539030

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microsoft.Extensions.Caching.StackExchangeRedis 9.0.3 - when using HybridCache RedisCacheImpl.IsHybridCacheDefined causes infinite recursion

3 participants