Example #1
0
 public SimpleCacheItem(T item, CacheExpiration expiration)
 {
     Item       = item;
     Expiration = expiration;
     Expires    = DateTime.Now.Add(TimeSpan.FromMilliseconds(expiration.Milliseconds));
 }
Example #2
0
 public void Set(string key, T value, CacheExpiration expiration)
 {
     _items[key] = new SimpleCacheItem <T>(value, expiration);
 }