예제 #1
0
 public MemoryCache(string name)
 {
     this.Name  = name;
     _cache     = new ConcurrentDictionary <string, CacheEntry>(StringComparer.OrdinalIgnoreCase);
     _expirator = new Expirator(OnExpired, _cache);
 }
예제 #2
0
 public MemoryCache()
 {
     this.Name  = typeof(MemoryCache).FullName + "#" + Environment.TickCount64.ToString("X");
     _cache     = new ConcurrentDictionary <string, CacheEntry>(StringComparer.OrdinalIgnoreCase);
     _expirator = new Expirator(OnExpired, _cache);
 }