/// <summary> /// Creates a new KeyValueCache. Default expiration is 1 day. /// </summary> /// <param name="cacheDelegate">The delegate that returns the initial list of items.</param> /// <param name="lookupDelegate">The delegate used to lookup an item if it does not exist in the cache.</param> public KeyValueCache(InitializeCache cacheDelegate, LookUpItem lookupDelegate) : base(cacheDelegate, lookupDelegate) { }
/// <summary> /// Creates a new KeyValueCache. Default expiration is 1 day. /// </summary> /// <param name="cacheDelegate">The delegate that returns the initial list of items.</param> /// <param name="expiration">The amount of time the cache is allowed to persist.</param> /// <param name="lookupDelegate">The delegate used to lookup an item if it does not exist in the cache.</param> public KeyValueCache(InitializeCache cacheDelegate, LookUpItem lookupDelegate, TimeSpan expiration) : base(cacheDelegate, expiration, lookupDelegate) { }
/// <summary> /// Creates a new KeyValueCache. Default expiration is 1 day. /// </summary> /// <param name="cacheDelegate">The delegate that returns the initial list of items.</param> public KeyValueCache(InitializeCache cacheDelegate) : base(cacheDelegate) { }
/// <summary> /// Creates a new KeyValueCache. Default expiration is 1 day. /// </summary> /// <param name="cacheDelegate">The delegate that returns the initial list of items.</param> /// <param name="expiration">The amount of time the cache is allowed to persist.</param> public KeyValueCache(InitializeCache cacheDelegate, TimeSpan expiration) : base(cacheDelegate, expiration) { }
/// <summary> /// Creates a new ListCache. Default expiration is 1 day. /// </summary> /// <param name="cacheDelegate">The delegate that returns the initial list of items.</param> public ListCache(InitializeCache cacheDelegate) : base(cacheDelegate) { }
/// <summary> /// Creates a new ReadOnlyListCache. Default expiration is 1 day. /// </summary> /// <param name="expiration">Amount of time cache is allowed to persist.</param> public ReadOnlyListCache(InitializeCache cacheDelegate, TimeSpan expiration) : base(cacheDelegate, expiration) { }
/// <summary> /// Creates a new ReadOnlyListCache. Default expiration is 1 day. /// </summary> /// <param name="cacheDelegate">The delegate that returns the initial list of items.</param> public ReadOnlyListCache(InitializeCache cacheDelegate) : base(cacheDelegate) { }
public Cache(InitializeCache cacheDelegate, TimeSpan expiration) { expirationTime = expiration; _cacheDelegate = cacheDelegate; }
public Cache(InitializeCache cacheDelegate) { expirationTime = new TimeSpan(24, 0, 0); _cacheDelegate = cacheDelegate; }