Skip to content

Commit

Permalink
Merge pull request #149 from tschirmer/master
Browse files Browse the repository at this point in the history
Updated to Support Sentinel Auth
  • Loading branch information
colinmollenhour authored Jan 3, 2020
2 parents 2cfb900 + 7e877aa commit 5dd4032
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Cm/Cache/Backend/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ public function __construct($options = array())
if ($sentinelClientOptions->readTimeout) {
$sentinelClient->setReadTimeout($sentinelClientOptions->readTimeout);
}
// Sentinel currently doesn't support AUTH
//if ($password) {
// $sentinelClient->auth($password) or Zend_Cache::throwException('Unable to authenticate with the redis sentinel.');
//}
if ($sentinelClientOptions->password) {
$sentinelClient->auth($sentinelClientOptions->password) or Zend_Cache::throwException('Unable to authenticate with the redis sentinel.');
}
$sentinel = new Credis_Sentinel($sentinelClient);
$sentinel
->setClientTimeout($this->_clientOptions->timeout)
Expand Down

0 comments on commit 5dd4032

Please sign in to comment.