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.3.0.0 (4.3.0.0)

Syntax

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

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.
 Copy imageCopy
...
theCache.Unlock("cachedItemKey", lockHandle);
...

See Also