summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers/Cache_redis.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-08-31 14:11:47 +0200
committerAndrey Andreev <narf@devilix.net>2015-08-31 14:11:47 +0200
commit24a4a6ac476b0ca1d47d01fdb8f2b3a6e7b39c24 (patch)
tree28c806f9e6c013ca386b481750d294007c208595 /system/libraries/Cache/drivers/Cache_redis.php
parentbe178a79382cae5079622396f8f9679a15e0f58b (diff)
Fix #4066
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_redis.php')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index d7dca1973..2825acfd3 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.');
}
}
catch (RedisException $e)
{
- throw new RuntimeException('Cache: Redis connection refused ('.$e->getMessage().')');
+ log_message('error', '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 authentication failed.');
}
// 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');
}
// ------------------------------------------------------------------------