Overview
Tries to acquire lock for a shared key.string $Cache.TryLock(key: string)
Arguments
string key
Shared lock key.
Example
$Cache.Set('myint', 4); var tokenValue = $Cache.TryLock('myint'); if (tokenValue != null) { // Locked code block $Cache.ReleaseLock('myint',tokenValue1); } else { // Already locked }
Examples
$Cache.Set('myint', 4); var tokenValue = $Cache.TryLock('myint'); if (tokenValue != null) { // Locked code block $Cache.ReleaseLock('myint',tokenValue1); } else { // Already locked }