@@ -28,7 +28,7 @@ the second and third parameters::
2828
2929 $cache = new CouchbaseBucketAdapter(
3030 // the client object that sets options and adds the server instance(s)
31- \CouchbaseCluster $client,
31+ \CouchbaseBucket $client,
3232
3333 // the name of bucket
3434 string $bucket,
@@ -37,32 +37,11 @@ the second and third parameters::
3737 $namespace = '',
3838
3939 // the default lifetime (in seconds) for cache items that do not define their
40- // own lifetime, with a value 0 causing items to be stored indefinitely (i.e.
41- // until MemcachedAdapter::clear() is invoked or the server(s) are restarted)
40+ // own lifetime, with a value 0 causing items to be stored indefinitely
4241 $defaultLifetime = 0,
43-
44- // associative array of configuration options
45- array $options = [
46- 'operationTimeout' => 10,
47- 'configTimeout' => 5,
48- 'configNodeTimeout' => 20,
49- ]
5042 );
5143
5244
53- Available Options
54- ~~~~~~~~~~~~~~~~~
55-
56- ``operationTimeout `` (type: ``int ``, default: ``2500000 ``)
57- The operation timeout (in microseconds) is the maximum amount of time the library will
58- wait for an operation to receive a response before invoking its callback with a failure status.
59-
60- ``configTimeout `` (type: ``int ``, default: ``5000000 ``)
61- How long (in microseconds) the client will wait to obtain the initial configuration.
62-
63- ``configNodeTimeout `` (type: ``int ``, default: ``2000000 ``)
64- Per-node configuration timeout (in microseconds).
65-
6645Configure the Connection
6746------------------------
6847
@@ -72,8 +51,16 @@ helper method allows creating and configuring a `Couchbase Bucket`_ class instan
7251
7352 use Symfony\Component\Cache\Adapter\CouchbaseBucketAdapter;
7453
54+ // pass a single DSN string to register a single server with the client
55+ $client = CouchbaseBucketAdapter::createConnection(
56+ 'couchbase://localhost'
57+ // the DSN can include config options (pass them as a query string):
58+ // 'couchbase://localhost:11210?operationTimeout=10'
59+ // 'couchbase://localhost:11210?operationTimeout=10&configTimout=20'
60+ );
61+
7562 // pass an array of DSN strings to register multiple servers with the client
76- $client =MemcachedAdapter ::createConnection([
63+ $client =CouchbaseBucketAdapter ::createConnection([
7764 'couchbase://10.0.0.100',
7865 'couchbase://10.0.0.101',
7966 'couchbase://10.0.0.102',
@@ -82,8 +69,8 @@ helper method allows creating and configuring a `Couchbase Bucket`_ class instan
8269
8370 // a single DSN can define multiple servers using the following syntax:
8471 // host[hostname-or-IP:port] (where port is optional). Sockets must include a trailing ':'
85- $client =MemcachedAdapter ::createConnection(
86- 'couchbase:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3 '
72+ $client =CouchbaseBucketAdapter ::createConnection(
73+ 'couchbase:?host[localhost]&host[localhost:12345]'
8774 );
8875
8976
@@ -97,14 +84,15 @@ option names and their respective values::
9784
9885 use Symfony\Component\Cache\Adapter\CouchbaseBucketAdapter;
9986
100- $client =MemcachedAdapter ::createConnection(
87+ $client =CouchbaseBucketAdapter ::createConnection(
10188 // a DSN string or an array of DSN strings
10289 [],
10390
10491 // associative array of configuration options
10592 [
10693 'username' => 'xxxxxx',
10794 'password' => 'yyyyyy',
95+ 'configTimeout' => '100',
10896 ]
10997 );
11098
@@ -117,18 +105,46 @@ Available Options
117105``password `` (type: ``string ``, default: ````)
118106 Password of connection ``CouchbaseCluster ``.
119107
108+ ``operationTimeout `` (type: ``int ``, default: ``2500000 ``)
109+ The operation timeout (in microseconds) is the maximum amount of time the library will
110+ wait for an operation to receive a response before invoking its callback with a failure status.
111+
112+ ``configTimeout `` (type: ``int ``, default: ``5000000 ``)
113+ How long (in microseconds) the client will wait to obtain the initial configuration.
114+
115+ ``configNodeTimeout `` (type: ``int ``, default: ``2000000 ``)
116+ Per-node configuration timeout (in microseconds).
117+
118+ ``viewTimeout `` (type: ``int ``, default: ``75000000 ``)
119+ The I/O timeout (in microseconds) for HTTP requests to Couchbase Views API.
120+
121+ ``httpTimeout `` (type: ``int ``, default: ``75000000 ``)
122+ The I/O timeout (in microseconds) for HTTP queries (management API).
123+
124+ ``configDelay `` (type: ``int ``, default: ``10000 ``)
125+ Config refresh throttling
126+ Modify the amount of time (in microseconds) before the configiration error threshold will forcefully be set to its maximum number forcing a configuration refresh.
127+
128+ ``htconfigIdleTimeout `` (type: ``int ``, default: ``4294967295 ``)
129+ Idling/Persistence for HTTP bootstrap (in microseconds).
130+
131+ ``durabilityInterval `` (type: ``int ``, default: ``100000 ``)
132+ The time (in microseconds) the client will wait between repeated probes to a given server.
133+
134+ ``durabilityTimeout `` (type: ``int ``, default: ``5000000 ``)
135+ The time (in microseconds) the client will spend sending repeated probes to a given key's vBucket masters and replicas before they are deemed not to have satisfied the durability requirements.
120136
121137..tip ::
122138
123- Reference the `Memcached `_ extension's `predefined constants `_ documentation
139+ Reference the `Couchbase Bucket `_ extension's `predefined constants `_ documentation
124140 for additional information about the available options.
125141
126142.. _`Transmission Control Protocol (TCP)` :https://en.wikipedia.org/wiki/Transmission_Control_Protocol
127143.. _`User Datagram Protocol (UDP)` :https://en.wikipedia.org/wiki/User_Datagram_Protocol
128144.. _`no-delay` :https://en.wikipedia.org/wiki/TCP_NODELAY
129145.. _`keep-alive` :https://en.wikipedia.org/wiki/Keepalive
130146.. _`Couchbase PHP extension` :https://docs.couchbase.com/sdk-api/couchbase-php-client-2.6.0/files/couchbase.html
131- .. _`predefined constants` :http ://php.net/manual/en/memcached.constants.php
147+ .. _`predefined constants` :https ://docs.couchbase.com/sdk-api/couchbase-php-client-2.6.0/classes/Couchbase.Bucket.html
132148.. _`Couchbase server` :https://couchbase.com/
133149.. _`Couchbase Bucket` :https://docs.couchbase.com/sdk-api/couchbase-php-client-2.6.0/classes/Couchbase.Bucket.html
134150.. _`Data Source Name (DSN)` :https://en.wikipedia.org/wiki/Data_source_name