public void Add(CacheItem <TKey, TValue> item) { // Evict / Remove using policy if capacity has reached if (_items.Count >= _itemCapacity) { TKey keyRemoved = _evictionPolicy.RemoveItem(ref _list); // Remove from cache _items.Remove(keyRemoved); } // Add using Policy _evictionPolicy.AddItem(ref _list, item); // Add items _items.Add(item.Key, item); }