From 7e877aaa674871c999ed90f0be485d40ebea0e31 Mon Sep 17 00:00:00 2001 From: tschirmer Date: Fri, 3 Jan 2020 18:51:18 +1000 Subject: [PATCH] Updated to Support Sentinel Auth Added Configuration with Sentinel AUTH Support --- Cm/Cache/Backend/Redis.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Cm/Cache/Backend/Redis.php b/Cm/Cache/Backend/Redis.php index eb89b12..0013de0 100644 --- a/Cm/Cache/Backend/Redis.php +++ b/Cm/Cache/Backend/Redis.php @@ -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)