Unlocks a locked cached item if the correct lock-id is specified.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)

Syntax

C#
public virtual void Unlock(
	string key,
	LockHandle lockHandle
)
Visual Basic
Public Overridable Sub Unlock ( _
	key As String, _
	lockHandle As LockHandle _
)
Visual C++
public:
virtual void Unlock(
	String^ key, 
	LockHandle^ lockHandle
)

Parameters

key
Type: System..::..String
key of a cached item to be unlocked
lockHandle
Type: Alachisoft.NCache.Web.Caching..::..LockHandle
An instance of LockHandle that was generated when lock was acquired.

Examples

Following example demonstrates how to unlock a cached item.
CopyC#
...
theCache.Unlock("cachedItemKey", lockHandle);
...

See Also