MemoryCache::Contains Method (String^, String^)
.NET Framework (current version)
Determines whether a cache entry exists in the cache.
Assembly: System.Runtime.Caching (in System.Runtime.Caching.dll)
Parameters
- key
-
Type:
System::String^
A unique identifier for the cache entry to search for.
- 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::Booleantrue if the cache contains a cache entry whose key matches key; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | key is null. |
| NotSupportedException | regionName is not null. |
.NET Framework
Available since 4.0
Available since 4.0
Show: