Click or drag to resize
ICacheAccessorInsert Method
Inserts an object into the cache.

Namespace: CMS.Helpers.Caching.Abstractions
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax
C#
void Insert(
	string key,
	Object value,
	CMSCacheDependency dependencies,
	DateTime absoluteExpiration,
	TimeSpan slidingExpiration,
	CMSCacheItemPriority priority,
	CMSCacheItemRemovedCallback onRemoveCallback
)

Parameters

key
Type: SystemString
The cache key used to reference the object.
value
Type: SystemObject
The object to be inserted in the cache.
dependencies
Type: CMS.HelpersCMSCacheDependency
The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache.
absoluteExpiration
Type: SystemDateTime
The time at which the inserted object expires and is removed from the cache.
slidingExpiration
Type: SystemTimeSpan
The interval between the time the inserted object was last accessed and the time at which that object expires.
priority
Type: CMS.HelpersCMSCacheItemPriority
The cost of the object relative to other items stored in the cache.
onRemoveCallback
Type: CMS.HelpersCMSCacheItemRemovedCallback
A delegate that, if provided, will be called when an object is removed from the cache.
See Also