Cache::Insert Method (String^, Object^)
.NET Framework (current version)
Inserts an item into the Cache object with a cache key to reference its location, using default values provided by the CacheItemPriority enumeration.
Assembly: System.Web (in System.Web.dll)
Parameters
- key
-
Type:
System::String^
The cache key used to reference the item.
- value
-
Type:
System::Object^
The object to be inserted into the cache.
| Exception | Condition |
|---|---|
| ArgumentNullException | The key or value parameter is null. |
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 Default, a sliding expiration value of NoSlidingExpiration, and an absolute expiration value of NoAbsoluteExpiration.
.NET Framework
Available since 1.1
Available since 1.1
Show: