Example #1
0
 public Cache(IGettingValue <TKey, TValue> storage, ITime <TValue> time)
 {
     _storage  = storage;
     _cache    = new Dictionary <TKey, Element <TValue> >();
     _capacity = Defaultcapacity;
     _timeLive = time.TimeLive;
     _time     = time;
 }
Example #2
0
 public Cache(IGettingValue <TKey, TValue> storage, ITime <TValue> time, int capacity)
     : this(storage, time)
 {
     _capacity = capacity;
 }