ObjectCache.Set Method

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

When overridden in a derived class, inserts a cache entry into the cache.

Namespace:   System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

NameDescription
System_CAPS_pubmethodSet(CacheItem, CacheItemPolicy)

When overridden in a derived class, inserts the cache entry into the cache as a CacheItem instance, specifying information about how the entry will be evicted.

System_CAPS_pubmethodSet(String, Object, CacheItemPolicy, String)

When overridden in a derived class, inserts a cache entry into the cache.

System_CAPS_pubmethodSet(String, Object, DateTimeOffset, String)

When overridden in a derived class, inserts a cache entry into the cache, specifying time-based expiration details.

The typical behavior of the Set overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists.

Return to top
Show: