fix check redis version

This commit is contained in:
xiaomlove
2022-07-18 22:53:56 +08:00
parent e5d996cb75
commit 2912c89202
3 changed files with 15 additions and 8 deletions
+5 -2
View File
@@ -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();
}
}