public MemoryCacheLRU (MemoryCacheContainer owner, int trimLowerBound) { // this.trimLowerBound = trimLowerBound; index = new Dictionary <int, LinkedListNode <MemoryCacheEntry>> (); lru = new LinkedList <MemoryCacheEntry> (); this.owner = owner; }
public MemoryCacheLRU(MemoryCacheContainer owner, int trimLowerBound) { this.trimLowerBound = trimLowerBound; index = new Dictionary <int, LinkedListNode <MemoryCacheEntry> > (); lru = new LinkedList <MemoryCacheEntry> (); this.owner = owner; }
MemoryCacheContainer FindContainer(string key) { if (key == null) { throw new ArgumentNullException("key"); } if (emulateOneCPU || numCPUs == 1) { if (containers [0] == null) { containers [0] = new MemoryCacheContainer(this, 0, perfCounters); } return(containers [0]); } int containerIdx = Math.Abs(key.GetHashCode() % numCPUs); if (containers [containerIdx] == null) { containers [containerIdx] = new MemoryCacheContainer(this, containerIdx, perfCounters); } return(containers [containerIdx]); }