MemoryCache::Remove Method (String^, CacheEntryRemovedReason, String^)
Removes a cache entry from the cache using the reason.
Assembly: System.Runtime.Caching (in System.Runtime.Caching.dll)
public:
Object^ Remove(
String^ key,
CacheEntryRemovedReason reason,
String^ regionName = null
)
Parameters
- key
-
Type:
System::String^
A unique identifier for the cache entry to remove.
- reason
-
Type:
System.Runtime.Caching::CacheEntryRemovedReason
The reason the item was removed.
- regionName
-
Type:
System::String^
A named region in the cache to which a cache entry was added. Do not pass a value for this parameter. This parameter is null by default, because the MemoryCache class does not implement regions.
Return Value
Type: System::Object^If the entry is found in the cache, the removed cache entry; otherwise, null.
.NET Framework
Available since 4.7
Available since 4.7
Show: