summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 5d42905cb..8c650ff43 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -47,6 +47,7 @@ class CI_Cache_redis extends CI_Driver
*/
protected static $_default_config = array(
'host' => '127.0.0.1',
+ 'password' => null,
'port' => 6379,
'timeout' => 0
);
@@ -206,6 +207,10 @@ class CI_Cache_redis extends CI_Driver
{
show_error('Redis connection refused. ' . $e->getMessage());
}
+
+ if (isset($config['password'])) {
+ $this->_redis->auth($config['password']);
+ }
}
}