mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:48:51 +08:00
fix bugs
This commit is contained in:
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user