CouchbaseLock
Syntax
// With callback (automatic lock management)
couchbaseLock(cacheName, name, [timeout], [expires], [callback], [throwOnTimeout])
// Without callback (manual lock management)
couchbaseLock(cacheName, name, [timeout], [expires], [throwOnTimeout])Parameters
Parameter
Type
Required
Default
Description
Returns
Examples
Callback Mode (Recommended)
Manual Mode
With Custom Timeout
Payment Processing
Batch Job Coordination
Rate Limiting
Sequential Processing
Notes
Lock Behavior
With Callback
Without Callback
Error Handling
With throwOnTimeout=true (default)
With throwOnTimeout=false
Best Practices
✅ DO
❌ DON'T
Related Functions
See Also
Last updated
Was this helpful?
