Skip to content

Commit 5dd4032

Browse files
Merge pull request #149 from tschirmer/master
Updated to Support Sentinel Auth
2 parents 2cfb900 + 7e877aa commit 5dd4032

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Cm/Cache/Backend/Redis.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,9 @@ public function __construct($options = array())
174174
if ($sentinelClientOptions->readTimeout) {
175175
$sentinelClient->setReadTimeout($sentinelClientOptions->readTimeout);
176176
}
177-
// Sentinel currently doesn't support AUTH
178-
//if ($password) {
179-
// $sentinelClient->auth($password) or Zend_Cache::throwException('Unable to authenticate with the redis sentinel.');
180-
//}
177+
if ($sentinelClientOptions->password) {
178+
$sentinelClient->auth($sentinelClientOptions->password) or Zend_Cache::throwException('Unable to authenticate with the redis sentinel.');
179+
}
181180
$sentinel = new Credis_Sentinel($sentinelClient);
182181
$sentinel
183182
->setClientTimeout($this->_clientOptions->timeout)

0 commit comments

Comments
 (0)