Connect

couchbase

Use a Couchbase instance as a cache.

Introduced in version 4.12.0.

  • Common

  • Advanced

cache:
  label: ""
  couchbase:
    url: "" # No default (required)
    username: "" # No default (optional)
    password: "" # No default (optional)
    bucket: "" # No default (required)
cache:
  label: ""
  couchbase:
    url: "" # No default (required)
    username: "" # No default (optional)
    password: "" # No default (optional)
    bucket: "" # No default (required)
    collection: "" # No default (optional)
    scope: "" # No default (optional)
    transcoder: legacy
    timeout: 15s
    default_ttl: "" # No default (optional)

Fields

bucket

The name of the Couchbase bucket to access.

Type: string

collection

The name of the collection within the bucket to access.

Type: string

default_ttl

An optional expiry applied to documents that are written without a TTL of their own, counted from the moment the document is written. When unset, such documents never expire.

Type: string

password

A password to authenticate with the Couchbase cluster.

This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Secrets.

Type: string

scope

Bucket scope.

Requires version 4.56.0 or later.

Type: string

timeout

The timeout for Couchbase operations, including connecting to the cluster and waiting for the bucket to become ready.

Type: string

Default: 15s

transcoder

The Couchbase transcoder to use for converting the data format of documents written to and read from Couchbase.

Type: string

Default: legacy

Option Summary

json

JSONTranscoder implements the default transcoding behavior and applies JSON transcoding to all values. This will apply the following behavior to the value: binary ([]byte) → error. default → JSON value, JSON Flags.

legacy

LegacyTranscoder implements the behavior for a backward-compatible transcoder. This transcoder implements behavior matching that of gocb v1.This will apply the following behavior to the value: binary ([]byte) → binary bytes, Binary expectedFlags. string → string bytes, String expectedFlags. default → JSON value, JSON expectedFlags.

raw

RawBinaryTranscoder implements passthrough behavior of raw binary data. This transcoder does not apply any serialization. This will apply the following behavior to the value: binary ([]byte) → binary bytes, binary expectedFlags. default → error.

rawjson

RawJSONTranscoder implements passthrough behavior of JSON data. This transcoder does not apply any serialization. It will forward data across the network without incurring unnecessary parsing costs. This will apply the following behavior to the value: binary ([]byte) → JSON bytes, JSON expectedFlags. string → JSON bytes, JSON expectedFlags. default → error.

rawstring

RawStringTranscoder implements passthrough behavior of raw string data. This transcoder does not apply any serialization. This will apply the following behavior to the value: string → string bytes, string expectedFlags. default → error.

url

The Couchbase connection string.

Type: string

# Examples:
url: couchbase://localhost:11210

username

A username to authenticate with the Couchbase cluster.

Type: string