Added redis auth support.
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 5d42905..8c650ff 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -47,6 +47,7 @@
*/
protected static $_default_config = array(
'host' => '127.0.0.1',
+ 'password' => null,
'port' => 6379,
'timeout' => 0
);
@@ -206,6 +207,10 @@
{
show_error('Redis connection refused. ' . $e->getMessage());
}
+
+ if (isset($config['password'])) {
+ $this->_redis->auth($config['password']);
+ }
}
}