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

.NET Framework (current version)

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 = null


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

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

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
Available since 4.0
Return to top