/// <summary> /// Insert an object into the cache using the specified cache strategy (lifetime management). /// </summary> /// <param name="key">The cache key used to reference the item.</param> /// <param name="value">The object to be inserted into the cache.</param> /// <param name="strategy">The strategy to apply for the inserted item (use Temporary for objects /// that are collectible and Permanent for objects you wish to keep forever).</param> public void Insert( string key, object value, CacheStrategy strategy ) { Check.VerifyNotNull( key, Error.NullParameter, "key" ); items[ key ] = new CacheEntry( key, value, strategy ); }
/// <summary> /// Insert an object into the cache using the specified cache strategy (lifetime management). /// </summary> /// <param name="key">The cache key used to reference the item.</param> /// <param name="value">The object to be inserted into the cache.</param> /// <param name="strategy">The strategy to apply for the inserted item (use Temporary for objects /// that are collectible and Permanent for objects you wish to keep forever).</param> public void Insert(string key, object value, CacheStrategy strategy) { Check.VerifyNotNull(key, Error.NullParameter, "key"); items[key] = new CacheEntry(key, value, strategy); }