Пример #1
0
 public SimpleCache(int maxNumberOfCacheEntries)
 {
     actualCache = new ConcurrentDictionary <string, CachedRequest>();
     lruKeys     = new ConcurrentLruSet <string>(maxNumberOfCacheEntries, key =>
     {
         CachedRequest _;
         actualCache.TryRemove(key, out _);
     });
 }
Пример #2
0
 public SimpleCache(int maxNumberOfCacheEntries)
 {
     actualCache = new ConcurrentDictionary<string, CachedRequest>();
     lruKeys = new ConcurrentLruSet<string>(maxNumberOfCacheEntries, key =>
     {
         CachedRequest _;
         actualCache.TryRemove(key, out _);
     });
 }