box install cfcouchbase
to install the SDKcfcouchbase
in the web root. For a more secure installation, place it outside the web root and create a mapping called cfcouchbase
.cfcouchbase.CouchbaseClient
for each bucket you want to connect to. The CouchbaseClient
class is thread safe and you only need one instance per bucket for your entire application. It is recommended that you store the instantiated client in a persistent scope such as application
when your app starts up so you can access it easily.shutdown()
method to close open connections to the Couchbase server. The following code sample will wait up to 10 seconds for connections to be closed.Danger: Each Couchbase bucket operates independently and uses its own authentication mechanisms. You need an instance ofCouchbaseClient
for each bucket you want to interact with. It is also extremely important that you shutdown the clients whenever your application goes down in order to gracefully shutdown connections, else your server might degrade.