eee
This commit is contained in:
+2
-2
@@ -260,7 +260,7 @@ class Router
|
||||
}
|
||||
|
||||
$usedArtifact = false;
|
||||
if (($scanConfig['cache_enabled'] ?? false) && !$routeChanged && $artifactState->has(static::$type)) {
|
||||
if (($scanConfig['cache_enabled'] ?? false) && $artifactState->has(static::$type)) {
|
||||
$artifact = $artifactState->load(static::$type);
|
||||
$router = $container->get(DataGrip::class)->get(static::$type);
|
||||
$usedArtifact = $router->importArtifact($artifact, $appChangedFiles);
|
||||
@@ -270,7 +270,7 @@ class Router
|
||||
// route artifact 只加速注解路由,不能替代 routes/*.php 的注册副作用。
|
||||
$this->read_dir_file(APP_PATH . 'routes');
|
||||
|
||||
if (!$routeChanged && !empty($appChangedFiles) && ($scanConfig['cache_enabled'] ?? false)) {
|
||||
if (!empty($appChangedFiles) && ($scanConfig['cache_enabled'] ?? false)) {
|
||||
$scanner->scanFiles($appChangedFiles, APP_PATH . 'app/', null, true);
|
||||
} elseif (!$usedArtifact) {
|
||||
$scanner->scan(APP_PATH . 'app/');
|
||||
|
||||
Reference in New Issue
Block a user