示例#1
0
        int _cInUse;                                // count of items in use

        internal UsageBucket(CacheUsage cacheUsage, byte bucket)
        {
            _cacheUsage = cacheUsage;
            _bucket     = bucket;

            _entries  = new UsageEntry[1];
            _freeHead = -1;
            _freeTail = -1;
        }
 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);
 }
 internal UsageBucket(CacheUsage cacheUsage, byte bucket)
 {
     this._cacheUsage = cacheUsage;
     this._bucket = bucket;
     this.InitZeroPages();
 }
示例#5
0
 internal UsageBucket(CacheUsage cacheUsage, byte bucket)
 {
     this._cacheUsage = cacheUsage;
     this._bucket     = bucket;
     this.InitZeroPages();
 }
示例#6
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 });
        }