Share via


DataCache.GetIfNewer Method (String, ref DataCacheItemVersion)

[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 cache, but only if a newer version of the object resides in the cache.

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

Syntax

'Declaration
Public Function GetIfNewer ( _
    key As String, _
    ByRef version As DataCacheItemVersion _
) As Object
'Usage
Dim instance As DataCache
Dim key As String
Dim version As DataCacheItemVersion
Dim returnValue As Object

returnValue = instance.GetIfNewer(key, version)
public Object GetIfNewer (
    string key,
    ref DataCacheItemVersion version
)
public:
Object^ GetIfNewer (
    String^ key, 
    DataCacheItemVersion^% version
)
public Object GetIfNewer (
    String key, 
    /** @ref */ DataCacheItemVersion version
)
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.

Return Value

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

See Also

Reference

DataCache Class
DataCache Members
Microsoft.Data.Caching Namespace