summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@qvister.se>2012-04-23 10:13:46 +0200
committerAnton Lindqvist <anton@qvister.se>2012-04-23 10:13:46 +0200
commit210e664abe857ddd267a7ba8713e2318d3e59a9c (patch)
tree77789cdaaa0d7cfcdf221f58ab6ba8ddbd19e14d
parent5a1d953e8a492326b8e8cbd0473b1593fe42cfa6 (diff)
Added redis auth support.
-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']);
+ }
}
}