예제 #1
0
 public MemoryCache(int maxItemCount = 200, ulong capacity = 0)
 {
     _cache = new LRUCache <string, ArraySegment <byte> >(maxItemCount, capacity);
     _cache.ItemOverCapacity += TriggerItemCapacity;
 }
예제 #2
0
 public MemoryCache(int maxItemCount, ulong capacity, TimeSpan ttl)
 {
     _cache = new LRUCache <string, ArraySegment <byte> >(maxItemCount, EqualityComparer <string> .Default, capacity, ttl);
     _cache.ItemOverCapacity += TriggerItemCapacity;
 }
예제 #3
0
 public MemoryCache(int maxItemCount, TimeSpan ttl)
 {
     _cache = new LRUCache <string, ArraySegment <byte> >(maxItemCount, ttl);
     _cache.ItemOverCapacity += TriggerItemCapacity;
 }