MemoryCache::GetValues Method (IEnumerable<String^>^, String^)
.NET Framework (current version)
Returns a set of cache entries that correspond to the specified keys.
Assembly: System.Runtime.Caching (in System.Runtime.Caching.dll)
public: virtual IDictionary<String^, Object^>^ GetValues( IEnumerable<String^>^ keys, String^ regionName = null ) override
Parameters
- keys
-
Type:
System.Collections.Generic::IEnumerable<String^>^
A set of unique identifiers for the cache entries to return.
- 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.Collections.Generic::IDictionary<String^, Object^>^A set of cache entries that correspond to the specified keys.
| Exception | Condition |
|---|---|
| NotSupportedException | regionName is not null. |
| ArgumentNullException | keys is null. |
| ArgumentException | An individual key in the collection is null. |
If a cache entry that is represented by the keys does not exist, the corresponding value for the returned object in the dictionary is set to null. Therefore, the returned dictionary always has the same number of items as the number of elements in keys.
.NET Framework
Available since 4.0
Available since 4.0
Show: