public CacheStoreQuotaManager(ICacheMetadataProvider metadataProvider, Action <CacheItemMetadata> remover,
                               CacheStoreSettings settings)
 {
     _remover                     = remover;
     _metadataProvider            = metadataProvider;
     _settings                    = settings;
     _needsGrandTotalHouseKeeping = settings.TotalQuota > 0;
     _needsPerDomainHouseKeeping  = settings.PerDomainQuota > 0;
     BuildStorageMetadata();
 }
Ejemplo n.º 2
0
        public CacheStoreQuotaManager(ICacheMetadataProvider metadataProvider, Action<CacheItemMetadata> remover, 
			CacheStoreSettings settings)
        {
            _remover = remover;
            _metadataProvider = metadataProvider;
            _settings = settings;
            _needsGrandTotalHouseKeeping = settings.TotalQuota > 0;
            _needsPerDomainHouseKeeping = settings.PerDomainQuota > 0;
            BuildStorageMetadata();
        }
 public void Setup()
 {
     _mockRepository = new MockRepository();
     _metadataProvider = _mockRepository.StrictMock<ICacheMetadataProvider>();
     _metadataProvider.Expect(x => x.GetDomainSizes()).Return(new Dictionary<string, long>());
 }
 /// <summary>
 /// </summary>
 /// <param name="metadataProvider">Most likely implemented by the cache store itself</param>
 /// <param name="remover">
 ///     This is a method most likely on the cache store which does not call
 ///     back on ItemRemoved. This is very important.
 /// </param>
 public CacheStoreQuotaManager(ICacheMetadataProvider metadataProvider, Action <CacheItemMetadata> remover)
     : this(metadataProvider, remover, new CacheStoreSettings())
 {
 }
Ejemplo n.º 5
0
 public void Setup()
 {
     _mockRepository   = new MockRepository();
     _metadataProvider = _mockRepository.StrictMock <ICacheMetadataProvider>();
     _metadataProvider.Expect(x => x.GetDomainSizes()).Return(new Dictionary <string, long>());
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="metadataProvider">Most likely implemented by the cache store itself</param>
 /// <param name="remover">This is a method most likely on the cache store which does not call
 /// back on ItemRemoved. This is very important.</param>
 public CacheStoreQuotaManager(ICacheMetadataProvider metadataProvider, Action<CacheItemMetadata> remover)
     : this(metadataProvider, remover, new CacheStoreSettings())
 {
 }