private ICache <int, int> GetCache(CacheType cacheType, int capacity) { switch (cacheType) { case CacheType.LRU_ThreadSafe: return(CacheBuilder.LRU_ThreadSafe <int, int>(capacity)); case CacheType.LRU_Non_ThreadSafe: return(CacheBuilder.LRU_NonThreadSafe <int, int>(capacity)); case CacheType.MRU_ThreadSafe: return(CacheBuilder.MRU_ThreadSafe <int, int>(capacity)); case CacheType.MRU_Non_ThreadSafe: return(CacheBuilder.MRU_NonThreadSafe <int, int>(capacity)); default: throw new NotSupportedException(cacheType.ToString()); } }