require redis and use reids to check ReAnnounce

This commit is contained in:
xiaomlove
2022-02-19 23:19:09 +08:00
parent 80bf8a29ff
commit f2f873e1e7
11 changed files with 53 additions and 40 deletions

View File

@@ -21,8 +21,10 @@ class class_cache_redis {
function __construct() {
$success = $this->connect(); // Connect to Redis
if ($success) {
do_log("Redis is enabled!");
$this->isEnabled = 1;
} else {
do_log("Redis is disabled!");
$this->isEnabled = 0;
}
}
@@ -61,6 +63,7 @@ class class_cache_redis {
}
return $connectResult;
} catch (\Exception $exception) {
do_log("Redis connect fail: " . $exception->getMessage(), 'error');
return false;
}
}