Esempio n. 1
0
        public static IServiceCollection AddRedis(this IServiceCollection services, RedisSettings settings)
        {
            services.AddDistributedRedisCache(o =>
            {
                o.Configuration = settings.ConnectionString;
                o.InstanceName  = settings.Instance;
            });

            return(services);
        }
 public DistributedCache(IDistributedCache cache, RedisSettings settings)
 {
     _cache    = cache;
     _settings = settings;
 }