System.Web.Caching.Cache.Insert Method

Inserts an item into the System.Web.Caching.Cache object with a cache key to reference its location, using default values provided by the System.Web.Caching.CacheItemPriority enumeration.

Syntax

public void Insert (string key, object value)

Parameters

key
The cache key used to reference the item.
value
The object to be inserted into the cache.

Remarks

This method will overwrite an existing cache item whose key matches the key parameter. The object added to the cache using this overload of the Insert method is inserted with no file or cache dependencies, a priority of CacheItemPriority.Default, a sliding expiration value of Cache.NoSlidingExpiration, and an absolute expiration value of Cache.NoAbsoluteExpiration.

Requirements

Namespace: System.Web.Caching
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0