summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-03-14 10:14:43 +0100
committerAndrey Andreev <narf@devilix.net>2016-03-14 10:14:43 +0100
commit27b2c59fd43c0206d300bb7409b4d983215a3f65 (patch)
treedab38bd586010324c32576efcfae540d5c8c3634
parentb4140a13778ad58ab570a3c9efffe402ef0bf160 (diff)
parentd327a4fc32b507a44e418cdd4b6e2c63690bc5cc (diff)
Merge pull request #4531 from masterklavi/redis_unixsocket
Removed socket_type option from Cache_redis
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php12
-rw-r--r--user_guide_src/source/libraries/caching.rst2
2 files changed, 1 insertions, 13 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 7d1b4f39a..ec4432437 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -55,7 +55,6 @@ class CI_Cache_redis extends CI_Driver
* @var array
*/
protected static $_default_config = array(
- 'socket_type' => 'tcp',
'host' => '127.0.0.1',
'password' => NULL,
'port' => 6379,
@@ -105,16 +104,7 @@ class CI_Cache_redis extends CI_Driver
try
{
- if ($config['socket_type'] === 'unix')
- {
- $success = $this->_redis->connect($config['socket']);
- }
- else // tcp socket
- {
- $success = $this->_redis->connect($config['host'], $config['port'], $config['timeout']);
- }
-
- if ( ! $success)
+ if ( ! $this->_redis->connect($config['host'], ($config['host'][0] === '/' ? 0 : $config['port']), $config['timeout']))
{
log_message('error', 'Cache: Redis connection failed. Check your configuration.');
}
diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst
index a7081ec6b..81019c015 100644
--- a/user_guide_src/source/libraries/caching.rst
+++ b/user_guide_src/source/libraries/caching.rst
@@ -255,8 +255,6 @@ To use it, you need `Redis server and phpredis PHP extension <https://github.com
Config options to connect to redis server must be stored in the application/config/redis.php file.
Available options are::
- $config['socket_type'] = 'tcp'; //`tcp` or `unix`
- $config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type
$config['host'] = '127.0.0.1';
$config['password'] = NULL;
$config['port'] = 6379;