Inheritance: CacheEntryCollection
示例#1
0
 internal ExpiresBucket(CacheExpires cacheExpires, byte bucket, DateTime utcNow)
 {
     _cacheExpires = cacheExpires;
     _bucket       = bucket;
     _counts       = new int[COUNTS_LENGTH];
     ResetCounts(utcNow);
     InitZeroPages();
 }
 internal ExpiresBucket(CacheExpires cacheExpires, byte bucket, DateTime utcNow)
 {
     this._cacheExpires = cacheExpires;
     this._bucket       = bucket;
     this._counts       = new int[4];
     this.ResetCounts(utcNow);
     this.InitZeroPages();
 }
 internal MemoryCacheStore(MemoryCache cache, PerfCounters perfCounters) {
     _cache = cache;
     _perfCounters = perfCounters;
     _entries = new Hashtable(new MemoryCacheEqualityComparer());
     _entriesLock = new Object();
     _expires = new CacheExpires(this);
     _usage = new CacheUsage(this);
     InitDisposableMembers();
 }
 internal MemoryCacheStore(MemoryCache cache, PerfCounters perfCounters)
 {
     _cache        = cache;
     _perfCounters = perfCounters;
     _entries      = new Hashtable(new MemoryCacheEqualityComparer());
     _entriesLock  = new Object();
     _expires      = new CacheExpires(this);
     _usage        = new CacheUsage(this);
     InitDisposableMembers();
 }
示例#5
0
 internal void UpdateSlidingExp(DateTime utcNow, CacheExpires expires)
 {
     if (_slidingExp > TimeSpan.Zero)
     {
         DateTime utcNewExpires = utcNow + _slidingExp;
         if (utcNewExpires - _utcAbsExp >= CacheExpires.MIN_UPDATE_DELTA || utcNewExpires < _utcAbsExp)
         {
             expires.UtcUpdate(this, utcNewExpires);
         }
     }
 }
示例#6
0
 internal void UpdateSlidingExp(DateTime utcNow, CacheExpires expires)
 {
     if (this._slidingExp > TimeSpan.Zero)
     {
         DateTime utcNewExpires = utcNow + this._slidingExp;
         if (((utcNewExpires - this._utcAbsExp) >= CacheExpires.MIN_UPDATE_DELTA) || (utcNewExpires < this._utcAbsExp))
         {
             expires.UtcUpdate(this, utcNewExpires);
         }
     }
 }
 internal void UpdateSlidingExp(DateTime utcNow, CacheExpires expires) {
     if (_slidingExp > TimeSpan.Zero) {
         DateTime utcNewExpires = utcNow + _slidingExp;
         if (utcNewExpires - _utcAbsExp >= CacheExpires.MIN_UPDATE_DELTA || utcNewExpires < _utcAbsExp) {
             expires.UtcUpdate(this, utcNewExpires);
         }
     }
 }
 internal void UpdateSlidingExp(DateTime utcNow, CacheExpires expires)
 {
     if (this._slidingExp > TimeSpan.Zero)
     {
         DateTime utcNewExpires = utcNow + this._slidingExp;
         if (((utcNewExpires - this._utcAbsExp) >= CacheExpires.MIN_UPDATE_DELTA) || (utcNewExpires < this._utcAbsExp))
         {
             expires.UtcUpdate(this, utcNewExpires);
         }
     }
 }