示例#1
0
		public SimpleCache(int maxNumberOfCacheEntries)
		{
			actualCache = new ConcurrentDictionary<string, CachedRequest>();
			lruKeys = new ConcurrentLruLSet<string>(maxNumberOfCacheEntries, key =>
			{
				CachedRequest _;
				actualCache.TryRemove(key, out _);
			});
		}
示例#2
0
 public SimpleCache(int maxNumberOfCacheEntries)
 {
     actualCache = new ConcurrentDictionary <string, CachedRequest>();
     lruKeys     = new ConcurrentLruLSet <string>(maxNumberOfCacheEntries, key =>
     {
         CachedRequest _;
         actualCache.TryRemove(key, out _);
     });
 }