MemoryCache::AddOrGetExisting Method
Inserts a cache entry into the cache.
Assembly: System.Runtime.Caching (in System.Runtime.Caching.dll)
| Name | Description | |
|---|---|---|
![]() | AddOrGetExisting(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^).) |
![]() | AddOrGetExisting(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^).) |
![]() | AddOrGetExisting(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.
