summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers/Cache_redis.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-10-12 16:16:35 +0200
committerAndrey Andreev <narf@devilix.net>2015-10-12 16:16:35 +0200
commit3013f53c59a5d2550a126b1493cf8262bd62dd53 (patch)
tree772e9b569a65e8567c366671373a2700c2028445 /system/libraries/Cache/drivers/Cache_redis.php
parent30f593bbb3408d0c076f2453818c68a7c5c59248 (diff)
parent36a055e49b040e6f18be7bce5e010c2a90d2f44f (diff)
Merge branch '3.0-stable' into develop
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_redis.php')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index d7dca1973..ea0059ff7 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -115,17 +115,17 @@ class CI_Cache_redis extends CI_Driver
if ( ! $success)
{
- throw new RuntimeException('Cache: Redis connection failed. Check your configuration.');
+ log_message('error', 'Cache: Redis connection failed. Check your configuration.');
+ }
+
+ if (isset($config['password']) && ! $this->_redis->auth($config['password']))
+ {
+ log_message('error', 'Cache: Redis authentication failed.');
}
}
catch (RedisException $e)
{
- throw new RuntimeException('Cache: Redis connection refused ('.$e->getMessage().')');
- }
-
- if (isset($config['password']) && ! $this->_redis->auth($config['password']))
- {
- throw new RuntimeException('Cache: Redis authentication failed.');
+ log_message('error', 'Cache: Redis connection refused ('.$e->getMessage().')');
}
// Initialize the index of serialized values.
@@ -298,13 +298,7 @@ class CI_Cache_redis extends CI_Driver
*/
public function is_supported()
{
- if ( ! extension_loaded('redis'))
- {
- log_message('debug', 'The Redis extension must be loaded to use Redis cache.');
- return FALSE;
- }
-
- return TRUE;
+ return extension_loaded('redis');
}
// ------------------------------------------------------------------------