Export (0) Print
Expand All

DataCache.Unlock Method (String, DataCacheLockHandle)

Releases objects locked in the cache. This method supports pessimistic concurrency by making sure that the appropriate DataCacheLockHandle is used for unlocking the object.

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

'Usage
Dim instance As DataCache
Dim key As String
Dim lockHandle As DataCacheLockHandle

instance.Unlock(key, lockHandle)

public void Unlock (
	string key,
	DataCacheLockHandle lockHandle
)
public void Unlock (
	String key, 
	DataCacheLockHandle lockHandle
)
public function Unlock (
	key : String, 
	lockHandle : DataCacheLockHandle
)

Parameters

key

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

lockHandle

The DataCacheLockHandle object that was returned when the object was locked

The lockHandle parameter is required and must match the DataCacheLockHandle of the locked object to succeed. For more information about concurrency, see Concurrency Models and Concurrency Methods.

Locked objects are never expired, but they may expire immediately if unlocked after their expiration time. For more information, see Expiration and Eviction.


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
  http://msdn.microsoft.com/en-us/library/microsoft.applicationserver.caching(v=azure.10).aspx 2011-08-26
Show:
© 2014 Microsoft