Example #1
0
 public NWayCache(ICacheAlgorithm <K> cacheAlgorithm, int setCount, int blockInSetCount)
 {
     _blockInSetCount = blockInSetCount;
     _setCount        = setCount;
     _cacheAlgorithm  = cacheAlgorithm;
     for (int i = 0; i < _setCount; i++)
     {
         _cachedItems.Add(i, new Dictionary <K, V>());
         _orders.Add(i, new List <K>());
     }
 }
Example #2
0
 public ObjectCache(ICacheAlgorithm <TKey, TValue> cacheAlgorithm)
 {
     algorithm = cacheAlgorithm;
 }