Exemplo n.º 1
0
        public DistributedCache(
            IOptions <CacheOptions> cacheOption,
            IDistributedCache cache,
            ICancellationTokenProvider cancellationTokenProvider,
            IObjectSerializer objectSerializer,
            ICurrentTenant currentTenant)
        {
            _cacheOption = cacheOption.Value;
            Cache        = cache;
            CancellationTokenProvider = cancellationTokenProvider;
            ObjectSerializer          = objectSerializer;
            CurrentTenant             = currentTenant;

            SetDefaultOptions();
        }
Exemplo n.º 2
0
        public DistributedCache(
            IOptions <CacheOptions> cacheOption,
            IOptions <DistributedCacheOptions> distributedCacheOption,
            IDistributedCache cache,
            ICancellationTokenProvider cancellationTokenProvider,
            IDistributedCacheSerializer serializer,
            ICurrentTenant currentTenant)
        {
            _distributedCacheOption = distributedCacheOption.Value;
            _cacheOption            = cacheOption.Value;
            Cache = cache;
            CancellationTokenProvider = cancellationTokenProvider;
            Logger        = NullLogger <DistributedCache <TCacheItem> > .Instance;
            Serializer    = serializer;
            CurrentTenant = currentTenant;

            SetDefaultOptions();
        }