CouchbaseGetProvider

Get the Couchbase cache provider instance for direct access to provider methods.

Syntax

couchbaseGetProvider(cacheName)

Parameters

Parameter
Type
Required
Description

cacheName

String

Yes

Name of the cache configuration

Returns

Returns the CouchbaseCache provider instance with access to:

  • Cache statistics and metadata

  • Connection management

  • Provider-specific methods

Examples

Basic Usage

// Get provider instance
provider = couchbaseGetProvider("default");

// Access provider information
println("Provider name: #provider.getName()#");
println("Provider type: #provider.getType()#");

Get Cache Statistics

Multiple Cache Configurations

Notes

  • The cache name must exist in your cache configuration

  • Throws an error if the cache is not configured or not a Couchbase provider

  • Provider instance is shared across requests (singleton)

  • Useful for accessing provider-specific functionality not available through standard cache functions

See Also

Last updated

Was this helpful?