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 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()) { }
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()) { }