private static int WithDefault(TimeSpan span) { var op = new CacheOptions { CacheName = nameof(OptionsTests), CacheItemExpiry = span, }; op.Initialize(); return(op.CacheItemExpiryPercentageRandomizationMilliseconds); }
private static int WithSpecific(TimeSpan span, int percentage) { var op = new CacheOptions { CacheName = nameof(WithSpecific), CacheItemExpiry = span, CacheItemExpiryPercentageRandomization = percentage, }; op.Initialize(); return(op.CacheItemExpiryPercentageRandomizationMilliseconds); }