diff options
Diffstat (limited to 'system/libraries/Cache/drivers')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_apc.php | 2 | ||||
-rw-r--r-- | system/libraries/Cache/drivers/Cache_memcached.php | 30 | ||||
-rw-r--r-- | system/libraries/Cache/drivers/Cache_redis.php | 2 | ||||
-rw-r--r-- | system/libraries/Cache/drivers/Cache_wincache.php | 2 |
4 files changed, 13 insertions, 23 deletions
diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php index 127a220a7..a84e7d2d3 100644 --- a/system/libraries/Cache/drivers/Cache_apc.php +++ b/system/libraries/Cache/drivers/Cache_apc.php @@ -150,7 +150,7 @@ class CI_Cache_apc extends CI_Driver { { if ( ! extension_loaded('apc') OR ! (bool) @ini_get('apc.enabled')) { - log_message('error', 'The APC PHP extension must be loaded to use APC Cache.'); + log_message('debug', 'The APC PHP extension must be loaded to use APC Cache.'); return FALSE; } diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index 246a7a264..d2a3a489d 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -51,9 +51,9 @@ class CI_Cache_memcached extends CI_Driver { */ protected $_memcache_conf = array( 'default' => array( - 'default_host' => '127.0.0.1', - 'default_port' => 11211, - 'default_weight' => 1 + 'host' => '127.0.0.1', + 'port' => 11211, + 'weight' => 1 ) ); @@ -173,7 +173,8 @@ class CI_Cache_memcached extends CI_Driver { { if (is_array($CI->config->config['memcached'])) { - $this->_memcache_conf = NULL; + $defaults = $this->_memcache_conf['default']; + $this->_memcache_conf = array(); foreach ($CI->config->config['memcached'] as $name => $conf) { @@ -196,22 +197,11 @@ class CI_Cache_memcached extends CI_Driver { return FALSE; } - foreach ($this->_memcache_conf as $name => $cache_server) + foreach ($this->_memcache_conf as $cache_server) { - if ( ! array_key_exists('hostname', $cache_server)) - { - $cache_server['hostname'] = $this->_memcache_conf['default']['default_host']; - } - - if ( ! array_key_exists('port', $cache_server)) - { - $cache_server['port'] = $this->_memcache_conf['default']['default_port']; - } - - if ( ! array_key_exists('weight', $cache_server)) - { - $cache_server['weight'] = $this->_memcache_conf['default']['default_weight']; - } + isset($cache_server['hostname']) OR $cache_server['hostname'] = $defaults['host']; + isset($cache_server['port']) OR $cache_server['port'] = $defaults['host']; + isset($cache_server['weight']) OR $cache_server['weight'] = $defaults['weight']; if (get_class($this->_memcached) === 'Memcache') { @@ -250,7 +240,7 @@ class CI_Cache_memcached extends CI_Driver { { if ( ! extension_loaded('memcached') && ! extension_loaded('memcache')) { - log_message('error', 'The Memcached Extension must be loaded to use Memcached Cache.'); + log_message('debug', 'The Memcached Extension must be loaded to use Memcached Cache.'); return FALSE; } diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 484f284f1..40823fcb4 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -168,7 +168,7 @@ class CI_Cache_redis extends CI_Driver } else { - log_message('error', 'The Redis extension must be loaded to use Redis cache.'); + log_message('debug', 'The Redis extension must be loaded to use Redis cache.'); return FALSE; } } diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php index d749978f5..80d3ac13d 100644 --- a/system/libraries/Cache/drivers/Cache_wincache.php +++ b/system/libraries/Cache/drivers/Cache_wincache.php @@ -150,7 +150,7 @@ class CI_Cache_wincache extends CI_Driver { { if ( ! extension_loaded('wincache')) { - log_message('error', 'The Wincache PHP extension must be loaded to use Wincache Cache.'); + log_message('debug', 'The Wincache PHP extension must be loaded to use Wincache Cache.'); return FALSE; } |