MemoryCache::AddOrGetExisting 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_pubmethodAddOrGetExisting(CacheItem^, CacheItemPolicy^)

Adds a cache entry into the cache using the specified CacheItem instance and details about how to evict the entry.(Overrides ObjectCache::AddOrGetExisting(CacheItem^, CacheItemPolicy^).)

System_CAPS_pubmethodAddOrGetExisting(String^, Object^, CacheItemPolicy^, String^)

Inserts a cache entry into the cache using the specified key and value and the specified details for how it is to be evicted.(Overrides ObjectCache::AddOrGetExisting(String^, Object^, CacheItemPolicy^, String^).)

System_CAPS_pubmethodAddOrGetExisting(String^, Object^, DateTimeOffset, String^)

Adds a cache entry into the cache using the specified key and a value and an absolute expiration value.(Overrides ObjectCache::AddOrGetExisting(String^, Object^, DateTimeOffset, String^).)

The AddOrGetExisting method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry.

Return to top
Show: