Share via


DataCache.GetIfNewer Method (String, ref 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, but only if a newer version of the object resides in the region.

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

Syntax

'Declaration
Public Function GetIfNewer ( _
    key As String, _
    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.GetIfNewer(key, version, region)
public Object GetIfNewer (
    string key,
    ref DataCacheItemVersion version,
    string region
)
public:
Object^ GetIfNewer (
    String^ key, 
    DataCacheItemVersion^% version, 
    String^ region
)
public Object GetIfNewer (
    String key, 
    /** @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 cache. If this parameter is , an exception is thrown.
  • version
    The version of the desired object, passed by reference. If this parameter is , an exception is thrown.
  • region
    The name of the region where the object resides.

Return Value

If the version in the region differs from the version parameter, the corresponding cached object is returned. If the version in the region is the same as the version parameter, is returned.

See Also

Reference

DataCache Class
DataCache Members
Microsoft.Data.Caching Namespace