Export (0) Print
Expand All

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

.NET Framework 4.6 and 4.5

When overridden in a derived class, gets 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 abstract IDictionary<string, Object> GetValues(
	IEnumerable<string> keys,
	string regionName
)

Parameters

keys
Type: System.Collections.Generic.IEnumerable<String>

A collection of unique identifiers for the cache entries to get.

regionName
Type: System.String

Optional. A named region in the cache to which the cache entry or entries were added, if regions are implemented. The default value for the optional parameter is null.

Return Value

Type: System.Collections.Generic.IDictionary<String, Object>
A dictionary of key/value pairs that represent cache entries.

The GetValues(IEnumerable<String>, String) method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call.

Although a caller can pass one or more keys to the method, there is no guarantee that all keys represent entries in the cache. Therefore, the returned dictionary might contain fewer items than the number of keys that were passed to the method.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft