Example #1
0
        public override object Add(string key, object item, CacheInsertOptions options)
        {
            CacheInsertOptions opts = options ?? DefaultInsertOptions;

            return(_cacheInternal.DoInsert(_isPublic, key, item, opts.Dependencies, opts.AbsoluteExpiration,
                                           opts.SlidingExpiration, opts.Priority, opts.OnRemovedCallback, false));
        }
 /// <devdoc>
 ///    <para>Insert will put an item into the cache and replace any pre-existing item with the same key.</para>
 /// </devdoc>
 public abstract void Insert(string key, object item, CacheInsertOptions options);
 /// <devdoc>
 ///    <para>Add will put an item into the cache, but not replace it if the key already exists.</para>
 /// </devdoc>
 public abstract object Add(string key, object item, CacheInsertOptions options);