/// <summary> /// Initializes a new instance of <see cref="RedisCache"/>. /// </summary> /// <param name="optionsAccessor">The configuration options.</param> public RedisCache(IOptions <RedisCacheOptions> optionsAccessor) { if (optionsAccessor == null) { throw new ArgumentNullException(nameof(optionsAccessor)); } _options = optionsAccessor.Value; // This allows partitioning a single backend cache for use with multiple apps/services. _instance = _options.InstanceName ?? string.Empty; }
public StackExchangeRedisDistributedCacheExtended(IOptions <RedisCacheOptions> redisCacheOptions) { _options = redisCacheOptions.Value; }