diff options
author | Anton Lindqvist <anton@qvister.se> | 2012-04-23 10:13:46 +0200 |
---|---|---|
committer | Anton Lindqvist <anton@qvister.se> | 2012-04-23 10:13:46 +0200 |
commit | 210e664abe857ddd267a7ba8713e2318d3e59a9c (patch) | |
tree | 77789cdaaa0d7cfcdf221f58ab6ba8ddbd19e14d /system/libraries/Cache/drivers/Cache_redis.php | |
parent | 5a1d953e8a492326b8e8cbd0473b1593fe42cfa6 (diff) |
Added redis auth support.
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_redis.php')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_redis.php | 5 |
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']); + } } } |