Skip to content

Commit c05b4b0

Browse files
committed
Attempting fix for #517
1 parent 6de854a commit c05b4b0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/examples/couchbase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919

2020
$InstanceCache = CacheManager::getInstance('couchbase', [
2121
'host' => 'your-couchbase-host',
22-
'port' => '11211',
22+
'port' => 8091,
2323
'username' => 'your-couchbase-username',
2424
'password' => 'your-couchbase-password',
25-
'timeout' => '1',
2625
'buckets' => [
2726
[
2827
'bucket' => 'default', // The bucket name, generally "default" by default

src/phpFastCache/Drivers/Couchbase/Driver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ protected function driverConnect()
137137

138138

139139
$host = isset($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1';
140+
$port = isset($this->config[ 'port' ]) ? $this->config[ 'port' ] : 8091;
140141
$password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : '';
141142
$username = isset($this->config[ 'username' ]) ? $this->config[ 'username' ] : '';
142143
$buckets = isset($this->config[ 'buckets' ]) ? $this->config[ 'buckets' ] : [
@@ -146,7 +147,7 @@ protected function driverConnect()
146147
],
147148
];
148149

149-
$this->instance = new CouchbaseClient("couchbase://{$host}", $username, $password);
150+
$this->instance = new CouchbaseClient("couchbase://{$host}:{$port}", $username, $password);
150151

151152
foreach ($buckets as $bucket) {
152153
$this->bucketCurrent = $this->bucketCurrent ?: $bucket[ 'bucket' ];

0 commit comments

Comments
 (0)