Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
In presence of a single instance of Redis, I may need to use a multi-tenant environment. Meaning multiple and different applications using the same Redis instance. In this context I might set all keys of each single application with a predetermined prefix.
Unfortunately, the actual extension "Microsoft.Extensions.Caching.StackExchangeRedis" not provide to set a prefix for the application.
Describe the solution you'd like
Add a option "KeyPrefix" in the class: https://github.com/dotnet/aspnetcore/blob/main/src/Caching/StackExchangeRedis/src/RedisCacheOptions.cs
Manage this option in the class:
https://github.com/dotnet/aspnetcore/blob/main/src/Caching/StackExchangeRedis/src/RedisCache.cs
using the extension WithKeyPrefix of IDatabase (https://github.com/StackExchange/StackExchange.Redis/blob/main/src/StackExchange.Redis/KeyspaceIsolation/DatabaseExtension.cs).
Additional context
No response