DataCache.GetIfNewer Method (String, DataCacheItemVersion)

 

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

Namespace:   Microsoft.ApplicationServer.Caching
Assembly:  Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)

Syntax

public object GetIfNewer(
    string key,
    ref DataCacheItemVersion version
)
public:
Object^ GetIfNewer(
    String^ key,
    DataCacheItemVersion^% version
)
member GetIfNewer : 
        key:string *
        version:DataCacheItemVersion byref -> Object
Public Function GetIfNewer (
    key As String,
    ByRef version As DataCacheItemVersion
) As Object

Parameters

  • key
    Type: System.String

    The unique value that is used to identify the object in the cache.

Return Value

Type: System.Object

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, null is returned.

See Also

GetIfNewer Overload
DataCache Class
Microsoft.ApplicationServer.Caching Namespace

Return to top