mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
fix check redis version
This commit is contained in:
@@ -371,13 +371,16 @@ class NexusDB
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed|\Redis|null
|
||||
*/
|
||||
public static function redis()
|
||||
{
|
||||
if (IN_NEXUS) {
|
||||
global $Cache;
|
||||
$Cache->getRedis();
|
||||
return $Cache->getRedis();
|
||||
} else {
|
||||
Redis::connection()->client();
|
||||
return Redis::connection()->client();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -665,8 +665,7 @@ class Install
|
||||
|
||||
public function getRedisVersionInfo(): array
|
||||
{
|
||||
global $Cache;
|
||||
$redis = $Cache->getRedis();
|
||||
$redis = NexusDB::redis();
|
||||
$result = $redis->info();
|
||||
$version = $result['redis_version'];
|
||||
$match = version_compare($version, '2.0.0', '>=');
|
||||
|
||||
Reference in New Issue
Block a user