DataCache.BulkGet Method (IEnumerable<String>, String)

 

Returns objects for the specified keys from the specified region of the cache. Not supported in Windows Azure Shared Caching.

Namespace:   Microsoft.ApplicationServer.Caching
Assembly:  Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)

Syntax

public IEnumerable<KeyValuePair<string, object>> BulkGet(
    IEnumerable<string> keys,
    string region
)
public:
IEnumerable<KeyValuePair<String^, Object^>>^ BulkGet(
    IEnumerable<String^>^ keys,
    String^ region
)
member BulkGet : 
        keys:IEnumerable<string> *
        region:string -> IEnumerable<KeyValuePair<string, Object>>
Public Function BulkGet (
    keys As IEnumerable(Of String),
    region As String
) As IEnumerable(Of KeyValuePair(Of String, Object))

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<KeyValuePair<String, Object>>

Returns an IEnumerable<T> object with a list of key and value pairs.

Remarks

Parameter validation behavior:

  • If the specified region is not present, BulkGet will return a null IEnumerable object.

  • If a key is not present in the region, the object returned by the enumerator for the key will be null. For example, the key/value pair returned would be <key,null>.

Performance considerations - BulkGet improves performance when used with small objects, for example, when retrieving many objects of 1 - 5KB or less in size. When using BulkGet to retrieve large objects, for example objects larger than 64 KB, BulkGet will not significantly improve performance and in fact may adversely impact performance. This reduced performance can occur because large bulk get responses are split into multiple single object responses to avoid large object heap usage.

See Also

BulkGet Overload
DataCache Class
Microsoft.ApplicationServer.Caching Namespace

Return to top