Helper extensions to register repositories behind a Redis-backed DispatchProxy, including caching attributes and DI helpers.
$ dotnet add package Redis.Cache.Proxy.Extensions
Helpers that wrap repositories behind a Redis-backed DispatchProxy, exposing attributes and DI extensions so you can enable transparent caching with a single registration call.
dotnet add package Redis.Cache.Proxy.Extensions
services.AddRedisCacheProxy("localhost:6379");
// or services.AddRedisCacheProxy(provider => ConnectionMultiplexer.Connect(...));
[RedisCached(expirationInMinutes: 5)]
internal class CustomerRepository : ICustomerRepository
{
// ...
}
services.AddRedisCachedRepository<ICustomerRepository, CustomerRepository>(
defaultExpiration: TimeSpan.FromMinutes(30));
The proxy intercepts sync and async methods (Task / Task<T>), generating deterministic cache keys from method arguments or Expression<Func<T,bool>> filters.
IConnectionMultiplexer registration helpers.RedisCachedAttribute with configurable expiration and sane defaults.Contains, BinaryExpression, etc.).netstandard2.0, net6.0, net7.0, net8.0) with NuGet assets included (README, logo.png, redis-cache-proxy.svg, symbol packages).