コード例 #1
0
 protected TimeBoundedCache(int lowWaterMark, int maxCacheItems, IEqualityComparer keyComparer, PurgingMode purgingMode, TimeSpan purgeInterval, bool doRemoveNotification)
 {
     _entries              = new Hashtable(keyComparer);
     CacheLock             = new ReaderWriterLockSlim();
     _lowWaterMark         = lowWaterMark;
     Capacity              = maxCacheItems;
     _purgingMode          = purgingMode;
     _purgeInterval        = purgeInterval;
     _doRemoveNotification = doRemoveNotification;
     _nextPurgeTimeUtc     = DateTime.UtcNow.Add(_purgeInterval);
 }
コード例 #2
0
 protected TimeBoundedCache(int lowWaterMark, int maxCacheItems, IEqualityComparer keyComparer, PurgingMode purgingMode, TimeSpan purgeInterval, bool doRemoveNotification)
 {
     this.entries              = new Hashtable(keyComparer);
     this.cacheLock            = new ReaderWriterLock();
     this.lowWaterMark         = lowWaterMark;
     this.maxCacheItems        = maxCacheItems;
     this.purgingMode          = purgingMode;
     this.purgeInterval        = purgeInterval;
     this.doRemoveNotification = doRemoveNotification;
     this.nextPurgeTimeUtc     = DateTime.UtcNow.Add(this.purgeInterval);
 }