public TagInfoMap(CacheOptions cacheOptions) { _TagInfoByTag = new ConcurrentDictionary<string, WeakReference>(); _IntervalTimer = new IntervalTimer(cacheOptions.TagMapScavengeInterval); _IntervalTimer.OnInterval += new Action(_ScavengeTagMap); }
public ExpirableCacheStore(CacheOptions cacheOptions) { _CacheOptions = cacheOptions; _CacheStore = new CacheStore(_CacheOptions); Guard.Assert(cacheOptions.ExpirationPollInterval.TotalSeconds >= 1.0, "expiration poll time interval must be at least one second long"); _IntervalTimer = new IntervalTimer(cacheOptions.ExpirationPollInterval); _IntervalTimer.OnInterval += new Action(_IntervalTimer_OnInterval); }