Megosztás a következőn keresztül:


DataCache.GetIfNewer Method (String, ref DataCacheItemVersion, String)

Gets an object from the specified region, but only if a newer version of the object resides in the region.

Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Client (in microsoft.applicationserver.caching.client.dll)

Usage

'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)

Syntax

'Declaration
Public Function GetIfNewer ( _
    key As String, _
    ByRef version As DataCacheItemVersion, _
    region As String _
) As Object
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
)

Parameters

  • key
    The unique value that is used to identify the object in the cache.
  • version
    The version of the desired object, passed by reference.
  • 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, null is returned.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Visual Studio 2010 and later, .NET Framework 4

Target Platforms

Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2

See Also

Reference

DataCache Class
DataCache Members
Microsoft.ApplicationServer.Caching Namespace

  ff425062(v=azure.10).md 2011-08-26