internal ExpiresBucket(CacheExpires cacheExpires, byte bucket, DateTime utcNow)
 {
     this._cacheExpires = cacheExpires;
     this._bucket       = bucket;
     this._counts       = new int[4];
     this.ResetCounts(utcNow);
     this.InitZeroPages();
 }
Пример #2
0
		public Cache () {
			_nItems = 0;

			_lockEntries = new ReaderWriterLock ();
			_arrEntries = new Hashtable ();

			_objExpires = new CacheExpires (this);
		}
 internal ExpiresBucket(CacheExpires cacheExpires, byte bucket, DateTime utcNow)
 {
     this._cacheExpires = cacheExpires;
     this._bucket = bucket;
     this._counts = new int[4];
     this.ResetCounts(utcNow);
     this.InitZeroPages();
 }
Пример #4
0
 public void Store(string identifier, CacheExpires expires, ICacheSignal signal, object item)
 {
     _cache.Insert(
         identifier,
         item,
         SignalDependency.For(signal),
         (expires ?? CacheExpires.Empty).Absolute,
         (expires ?? CacheExpires.Empty).Sliding);
 }
Пример #5
0
        int _cFreeLast;                             // count of free items in second half


        internal ExpiresBucket(CacheExpires cacheExpires, byte bucket)
        {
            _cacheExpires = cacheExpires;
            _bucket       = bucket;
            _freeHead     = -1;
            _freeTail     = -1;

            Debug.Validate("CacheValidateExpires", this);
        }
 internal CacheSingle(CacheCommon cacheCommon, CacheMultiple cacheMultiple, int iSubCache) : base(cacheCommon)
 {
     this._cacheMultiple = cacheMultiple;
     this._iSubCache     = iSubCache;
     this._entries       = new Hashtable(CacheKeyComparer.GetInstance());
     this._expires       = new CacheExpires(this);
     this._usage         = new CacheUsage(this);
     this._lock          = new object();
     this._insertBlock   = new ManualResetEvent(true);
 }
 internal CacheSingle(CacheCommon cacheCommon, CacheMultiple cacheMultiple, int iSubCache) : base(cacheCommon)
 {
     this._cacheMultiple = cacheMultiple;
     this._iSubCache = iSubCache;
     this._entries = new Hashtable(CacheKeyComparer.GetInstance());
     this._expires = new CacheExpires(this);
     this._usage = new CacheUsage(this);
     this._lock = new object();
     this._insertBlock = new ManualResetEvent(true);
 }
Пример #8
0
        CacheMultiple       _cacheMultiple;     /* the CacheMultiple containing this cache */

        /*
         * Constructs a new Cache.
         */
        internal CacheSingle(CacheCommon cacheCommon, CacheMultiple cacheMultiple, int iSubCache) : base(cacheCommon) {
            _cacheMultiple = cacheMultiple;
            _iSubCache = iSubCache;
            _entries = new Hashtable(CacheKeyComparer.GetInstance());
            _expires = new CacheExpires(this);
            _usage = new CacheUsage(this);
            _lock = new object();
            _insertBlock = new ManualResetEvent(true);
            cacheCommon.AddSRefTarget(new { _entries, _expires, _usage });
        }