summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-03-12 11:33:07 +0100
committerAndrey Andreev <narf@devilix.net>2016-03-12 11:33:23 +0100
commit9c948aa715a539aa4dcdd1647156436700411dd1 (patch)
tree925249262d1c4370685d7b37827a5c7491154544 /system/libraries/Cache
parentc13b4a6bfe45fc3eeb71aeb27ae0d69ef09580a5 (diff)
Merge pull request #4524 from masterklavi/memcached_refactoring
Cache_memcached configuration refactoring
Diffstat (limited to 'system/libraries/Cache')
-rw-r--r--system/libraries/Cache/drivers/Cache_memcached.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php
index df02ca2d0..6dee1e8e4 100644
--- a/system/libraries/Cache/drivers/Cache_memcached.php
+++ b/system/libraries/Cache/drivers/Cache_memcached.php
@@ -60,7 +60,7 @@ class CI_Cache_memcached extends CI_Driver {
*
* @var array
*/
- protected $_memcache_conf = array(
+ protected $_config = array(
'default' => array(
'host' => '127.0.0.1',
'port' => 11211,
@@ -81,19 +81,11 @@ class CI_Cache_memcached extends CI_Driver {
{
// Try to load memcached server info from the config file.
$CI =& get_instance();
- $defaults = $this->_memcache_conf['default'];
+ $defaults = $this->_config['default'];
if ($CI->config->load('memcached', TRUE, TRUE))
{
- if (is_array($CI->config->config['memcached']))
- {
- $this->_memcache_conf = array();
-
- foreach ($CI->config->config['memcached'] as $name => $conf)
- {
- $this->_memcache_conf[$name] = $conf;
- }
- }
+ $this->_config = $CI->config->config['memcached'];
}
if (class_exists('Memcached', FALSE))
@@ -110,7 +102,7 @@ class CI_Cache_memcached extends CI_Driver {
return;
}
- foreach ($this->_memcache_conf as $cache_server)
+ foreach ($this->_config as $cache_server)
{
isset($cache_server['hostname']) OR $cache_server['hostname'] = $defaults['host'];
isset($cache_server['port']) OR $cache_server['port'] = $defaults['port'];