MemoryCache.GetValues Method (IEnumerable<String>, String)

Returns a set of cache entries that correspond to the specified keys.

Namespace:  System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

public override IDictionary<string, Object> GetValues(
	IEnumerable<string> keys,
	string regionName
)

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.

ExceptionCondition
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

Supported in: 4.6, 4.5, 4
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft