public static IServiceCollection ConfigureRedisCache(this IServiceCollection services, Action <RedisCacheOptions> redisCacheSetupAction) { var redisCacheOptions = new RedisCacheOptions(); redisCacheSetupAction.Invoke(redisCacheOptions); services.AddSingleton(factory => redisCacheOptions); services.AddSingleton <IRedisCacheMaintenance, RedisCacheMaintenance>(); return(services); }
public RedisCacheMaintenance(RedisCacheOptions options) { _options = options; }