DistributedLock
Supported Actions
Attributes
Attribute
Type
Required
Description
Default
Examples
Basic Locking
<bx:RedisLock
name="account-update-lock"
cache="myRedisCache"
timeout="5s"
expires="60s">
// This code runs only if the lock is acquired
account.balance = account.balance - 100;
account.save();
</bx:RedisLock>Handling Lock Timeout
Critical Section with Automatic Bypass
Preventing Concurrent Operations
Last updated
Was this helpful?
