DataCache.Get Method (String, out DataCacheItemVersion, String)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets an object from the specified region by using the specified key. You may also provide the version to obtain the specific version of a key, if that version is still the most current in the region.

Namespace: Microsoft.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)

Syntax

'Declaration
Public Function Get ( _
    key As String, _
    <OutAttribute> ByRef version As DataCacheItemVersion, _
    region As String _
) As Object
'Usage
Dim instance As DataCache
Dim key As String
Dim version As DataCacheItemVersion
Dim region As String
Dim returnValue As Object

returnValue = instance.Get(key, version, region)
public Object Get (
    string key,
    out DataCacheItemVersion version,
    string region
)
public:
Object^ Get (
    String^ key, 
    [OutAttribute] DataCacheItemVersion^% version, 
    String^ region
)
public Object Get (
    String key, 
    /** @attribute OutAttribute() */ /** @ref */ DataCacheItemVersion version, 
    String region
)
JScript does not support passing value-type arguments by reference.

Parameters

  • key
    The unique value that is used to identify the object in the region.
  • version
    The version of the desired object. If this parameter is null, the version of the current object is retrieved.
  • region
    The name of the region where the object resides.

Return Value

The object that was cached by using the specified key. Null is returned if the key does not exist. Even if the key does exist, may also be returned because the object has been updated to a new version.

Remarks

For more information about this method, see How to: Get an Object from Cache (Velocity).

See Also

Reference

DataCache Class
DataCache Members
Microsoft.Data.Caching Namespace