DataCache.GetIfNewer Method (String, ref 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)

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, 
	/** @ref */ DataCacheItemVersion version



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


The version of the desired object, passed by reference.

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

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

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 2011-08-26