SALES: 1-800-867-1380

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)

'Declaration
Public Sub Unlock ( _
	key As String, _
	lockHandle As DataCacheLockHandle _
)
'Usage
Dim instance As DataCache
Dim key As String
Dim lockHandle As DataCacheLockHandle

instance.Unlock(key, lockHandle)

Parameters

key
Type: System..::..String
The unique value that is used to identify the object in the region.
lockHandle
Type: Microsoft.ApplicationServer.Caching..::..DataCacheLockHandle
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.

Locked objects are never expired, but they may expire immediately if unlocked after their expiration time.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft