You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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(..).
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
Type of issue
Code doesn't work
Description
The documentation states:
However, when calling
AddKeyedRedisDistributedCache
theIDistributedCache
is not registered as a keyed service and cannot be resolved in a keyed context, either from[FromKeyedServices]
or fromIServiceProvider.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
The text was updated successfully, but these errors were encountered: