Ejemplo n.º 1
0
 public SimpleCache(int maxNumberOfCacheEntries)
 {
     actualCache = new ConcurrentDictionary <string, CachedRequest>();
     lruKeys     = new ConcurrentLruSet <string>(maxNumberOfCacheEntries, key =>
     {
         CachedRequest _;
         actualCache.TryRemove(key, out _);
     });
 }
Ejemplo n.º 2
0
 public SimpleCache(int maxNumberOfCacheEntries)
 {
     actualCache = new ConcurrentDictionary<string, CachedRequest>();
     lruKeys = new ConcurrentLruSet<string>(maxNumberOfCacheEntries, key =>
     {
         CachedRequest _;
         actualCache.TryRemove(key, out _);
     });
 }