ObjectCache.GetValues Method (String, String[])

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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 virtual IDictionary<string, object> GetValues(
	string regionName,
	params string[] keys


Type: System.String

Optional. A named region in the cache to which the cache entry or entries were added, if regions are implemented. Because regions are not implemented in .NET Framework 4, the default is null.

Type: System.String[]

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

Return Value

Type: System.Collections.Generic.IDictionary<String, Object>

A dictionary of key/value pairs that represent cache entries.

The ObjectCache.GetValues method overload is like the GetValues(IEnumerable<String>, String) method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#.

This method is a virtual method because the ObjectCache class provides a default implementation that passes the params array to the GetValues(IEnumerable<String>, String) method overload.

.NET Framework
Available since 4.0
Return to top