MemoryCache::Set Method

.NET Framework (current version)
 

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: