MemoryCache.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.

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)

Inserts a cache entry into the cache by using a CacheItem instance to supply the key and value for the cache entry.(Overrides ObjectCache.Set(CacheItem, CacheItemPolicy).)

System_CAPS_pubmethodSet(String, Object, CacheItemPolicy, String)

Inserts a cache entry into the cache by using a key and a value and eviction.(Overrides ObjectCache.Set(String, Object, CacheItemPolicy, String).)

System_CAPS_pubmethodSet(String, Object, DateTimeOffset, String)

Inserts a cache entry into the cache by using a key and a value and specifies time-based expiration details.(Overrides ObjectCache.Set(String, Object, DateTimeOffset, String).)

If the specified entry does not exist, it is created. If the specified entry exists, it is updated.

Return to top
Show: