public values_preloaded_in_cache() { _cache = CacheBuilder .With <string, string>(UpdateWithKeyAndTime) .RefreshEvery(TimeSpan.FromMilliseconds(100)) .Preload("a", "b", "c") .Build(); }
public exceptions_thrown_when_retrieving_values() { _cache = CacheBuilder .With <string, DateTime>(key => { throw new Exception("bad"); }) .RefreshEvery(TimeSpan.FromMilliseconds(100)) .Preload("a", "b") .Build(); }
public values_updated_in_cache() { _cache = CacheBuilder .With <string, DateTime>(key => DateTime.Now) .RefreshEvery(TimeSpan.FromMilliseconds(10000)) .WithRampUpDuration(TimeSpan.FromMilliseconds(100)) .Preload("a", "b") .Build(); }
public old_values_in_cache() { _cache = CacheBuilder .With <string, DateTime>(key => { _count++; return(DateTime.Now); }) .RefreshEvery(TimeSpan.FromMilliseconds(400)) .EvictUnused() .Preload("a", "b") .Build(); }