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)

public Object GetIfNewer(
	string key,
	ref DataCacheItemVersion version


Type: System..::..String
The unique value that is used to identify the object in the cache.
Type: Microsoft.ApplicationServer.Caching..::..DataCacheItemVersion%
The version of the desired object, passed by reference.

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.