Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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 occurs in the region.
Namespace: System.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)
Syntax
'Declaration
Public Function GetIfNewer ( _
region As String, _
key As String, _
ByRef version As CacheItemVersion _
) As Object
'Usage
Dim instance As Cache
Dim region As String
Dim key As String
Dim version As CacheItemVersion
Dim returnValue As Object
returnValue = instance.GetIfNewer(region, key, version)
public Object GetIfNewer (
string region,
string key,
ref CacheItemVersion version
)
public:
Object^ GetIfNewer (
String^ region,
String^ key,
CacheItemVersion^% version
)
public Object GetIfNewer (
String region,
String key,
/** @ref */ CacheItemVersion version
)
JScript does not support passing value-type arguments by reference.
Parameters
- region
The name of the region. Use DefaultRegion if the object is not stored in a region.
- key
The unique value that is used to identify the object in the cache. If this parameter is null, an exception is thrown.
- version
The version of the desired object, passed by reference. If this parameter is null, an exception is thrown.
Return Value
If the version in the cache differs from the value in the version parameter, the corresponding cached object is returned. If the version in the cache is the same as the version parameter, null is returned.
Remarks
This method helps avoid unnecessary network traffic. For more information about concurrency, see Concurrency Models (Velocity) and Concurrency Methods (Velocity).