• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Method Unlock

Unlock(String, LockHandle)

Unlocks a locked cached item if the correct LockHandle is specified. If LockHandle is null Forcefully unlocks a locked cached item.

Declaration
void Unlock(string key, LockHandle lockHandle = null)
Parameters
Type Name Description
System.String key

Key of the cached item to be unlocked.

LockHandle lockHandle

An instance of LockHandle that is generated when the lock is acquired.

Examples

Following example demonstrates how to unlock a cached item.

ICache cache = CacheManager.GetCache("demoCache");
string key = "Product0";

cache.Unlock(key, lockHandle);
Back to top Copyright © 2017 Alachisoft