This commit is contained in:
xiaomlove
2022-04-06 21:32:57 +08:00
parent 03009c846e
commit 6ac7194d43
21 changed files with 659 additions and 66 deletions
+2 -2
View File
@@ -275,11 +275,11 @@ class NexusDB
global $Cache;
$result = $Cache->get_value($key);
if ($result === false) {
do_log("cache miss [$key], get from database.");
$result = $callback();
do_log("cache miss [$key]" );
$Cache->cache_value($key, $result, $ttl);
} else {
do_log("cache hit [$key].");
do_log("cache hit [$key]");
}
return $result;
} else {
+2 -1
View File
@@ -113,8 +113,10 @@ final class Nexus
public static function boot()
{
if (self::$booted) {
// file_put_contents('/tmp/reset.log', "booted\n",FILE_APPEND);
return;
}
// file_put_contents('/tmp/reset.log', "booting\n",FILE_APPEND);
$instance = new self();
$instance->setStartTimestamp();
$instance->setRequestId();
@@ -127,7 +129,6 @@ final class Nexus
public static function flush()
{
self::$booted = false;
}
private function setRequestId()