summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Cache/drivers')
-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 29f43ba6f..b55d8bf25 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -104,6 +104,11 @@ class CI_Cache_redis extends CI_Driver
try
{
+ if ($config['host']{0} === '/')
+ {
+ $config['port'] = 0; // for unix domain socket
+ }
+
if ( ! $this->_redis->connect($config['host'], $config['port'], $config['timeout']))
{
log_message('error', 'Cache: Redis connection failed. Check your configuration.');