For the complete documentation index, see llms.txt. This page is also available as Markdown.

Components

Complete reference for all Couchbase module Components.

🔒 Distributed Locking Components

Components for coordinating operations across multiple servers:

  • CouchbaseLock - Execute code with automatic distributed lock management

📖 Usage

CouchbaseLock Component

<bx:CouchbaseLock
    name="user-#userId#-update"
    cache="default"
    timeout="5"
    expires="30">

    // Critical section - only one server executes this at a time
    user = getUser(userId);
    user.balance += amount;
    saveUser(user);

</bx:CouchbaseLock>

Last updated

Was this helpful?