Esempio n. 1
0
 public TenantConfigurationCache(long cacheSize, TimeSpan cacheExpirationInterval, TimeSpan cacheCleanupInterval, ICacheTracer <OrganizationId> tracer, ICachePerformanceCounters perfCounters) : this(cacheSize, cacheExpirationInterval, cacheCleanupInterval, Cache <OrganizationId, TSettings> .DefaultPurgeInterval, tracer, perfCounters)
 {
 }
Esempio n. 2
0
 public AutoRefreshCache(long cacheSizeInBytes, TimeSpan cacheExpirationInterval, TimeSpan cacheCleanupInterval, TimeSpan cachePurgeInterval, TimeSpan refreshInterval, ICacheTracer <K> tracer, ICachePerformanceCounters perfCounters, AutoRefreshCache <K, V, StateType> .CreateEntryDelegate createEntry)
 {
     if (createEntry == null)
     {
         throw new ArgumentNullException("createEntry");
     }
     this.createEntry                = createEntry;
     this.tracer                     = tracer;
     this.cache                      = new Cache <K, V>(cacheSizeInBytes, cacheExpirationInterval, cacheCleanupInterval, cachePurgeInterval, tracer, perfCounters);
     this.itemsToRefresh             = new List <K>();
     this.refreshExpiredEntriesTimer = new GuardedTimer(new TimerCallback(this.RefreshExpiredEntries), null, refreshInterval);
     for (int i = 0; i < this.groupsInADLookupSyncObjects.Length; i++)
     {
         this.groupsInADLookupSyncObjects[i] = new object();
     }
 }
Esempio n. 3
0
 public TenantConfigurationCache(long cacheSize, TimeSpan cacheExpirationInterval, TimeSpan cacheCleanupInterval, TimeSpan cachePurgeInterval, ICacheTracer <OrganizationId> tracer, ICachePerformanceCounters perfCounters)
 {
     this.cache            = new Cache <OrganizationId, TSettings>(cacheSize, cacheExpirationInterval, cacheCleanupInterval, cachePurgeInterval, tracer, perfCounters);
     this.cache.OnRemoved += this.HandleCacheItemRemoved;
 }