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

Keyed Redis Distributed Cache is not supported, but the documentation says the opposite. #2625

Open
clegendre opened this issue Feb 14, 2025 · 1 comment

Comments

@clegendre
Copy link

clegendre commented Feb 14, 2025

Type of issue

Code doesn't work

Description

The documentation states:

Then you can retrieve the IDistributedCache instances using dependency injection. For example, to retrieve the connection from an example service:

However, when calling AddKeyedRedisDistributedCache the IDistributedCache is not registered as a keyed service and cannot be resolved in a keyed context, either from [FromKeyedServices] or from IServiceProvider.GetRequiredKeyedService(..).

Is there something I am missing?

Page URL

https://learn.microsoft.com/en-us/dotnet/aspire/caching/stackexchange-redis-distributed-caching-integration?tabs=dotnet-cli&pivots=redis

Content source URL

https://github.com/dotnet/docs-aspire/blob/main/docs/caching/stackexchange-redis-distributed-caching-integration.md

Document Version Independent Id

740e6fc5-dc20-b467-0ced-ea22f78e4b7c

Article author

@IEvangelist

Related Issues

@clegendre clegendre changed the title Keyed Redis Client is not supported, but the documentation says the opposite. Keyed Redis Distributed Cache is not supported, but the documentation says the opposite. Feb 14, 2025
@davidfowl
Copy link
Member

cc @eerhardt @sebastienros

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants