mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
invite pager get list only in count > 0
This commit is contained in:
@@ -19,10 +19,15 @@ class class_cache_redis {
|
||||
public $redis;
|
||||
|
||||
function __construct() {
|
||||
$this->connect(); // Connect to Redis
|
||||
$connectResult = $this->connect(); // Connect to Redis
|
||||
if ($connectResult) {
|
||||
$this->isEnabled = true;
|
||||
} else {
|
||||
$this->isEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private function connect()
|
||||
private function connect(): bool
|
||||
{
|
||||
$config = nexus_config('nexus.redis');
|
||||
$redis = new Redis();
|
||||
@@ -47,6 +52,7 @@ class class_cache_redis {
|
||||
} else {
|
||||
throw new \RuntimeException("Redis connect fail.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function getIsEnabled() {
|
||||
|
||||
Reference in New Issue
Block a user