Improve Redis IDistributedCache
integration
#8528
Labels
area-integrations
Issues pertaining to Aspire Integrations packages
redis
Issues related to redis integrations
Milestone
The current implementation doesn't support multiple
IDistributedCache
instances to be registered, either using dedicated Redis instances or a shared one with prefixes.This is due to how the
IDistributedCache
is used in aspnetcore and also how the extension method to register the service is designed. This is confusing users as reported here and from internal usage.dotnet/docs-aspire#2625
The suggestion is to change the current API to support these scenarios.
The following usage would then be possible:
This would result in:
IDistributedCache
service registration using the Redis resourceredis1
IDistributedCache
service using a different Redis resourceredis2
, and no key prefixIDistributedCache
service using the same Redis resourceredis2
, but with the"redis3"
service key, and the prefix"redis3"
for its keysService resolution would be done like so:
The text was updated successfully, but these errors were encountered: