Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -51,16 +51,17 @@ abstract class _Store
|
||||
{
|
||||
if ( static::$instance === NULL )
|
||||
{
|
||||
if ( \IPS\REDIS_ENABLED and \IPS\CACHE_METHOD == 'Redis' and ( \IPS\CACHE_CONFIG or \IPS\REDIS_CONFIG ) )
|
||||
if ( \IPS\Redis::isEnabled() )
|
||||
{
|
||||
try
|
||||
{
|
||||
/* Try and use Redis */
|
||||
$connection = \IPS\Redis::i()->connection('read');
|
||||
|
||||
if( !$connection )
|
||||
$writeConnection = \IPS\Redis::i()->connection('write');
|
||||
$readConnection = \IPS\Redis::i()->connection('read');
|
||||
|
||||
if( !$writeConnection OR !$readConnection )
|
||||
{
|
||||
throw new \RuntimeException;
|
||||
throw new \RedisException;
|
||||
}
|
||||
|
||||
/* No exceptions means it worked */
|
||||
|
||||
Reference in new issue
Block a user