Use a route cache file (speed optimization)

This commit is contained in:
Bernd Bestel
2020-04-13 21:26:34 +02:00
parent 6f4769a7b3
commit 59cd4dbac4
2 changed files with 734 additions and 0 deletions

View File

@@ -78,4 +78,7 @@ if (!empty(GROCY_BASE_PATH))
$app->addRoutingMiddleware();
$app->addErrorMiddleware(true, false, false);
// Cache "compiled" routes
$app->getRouteCollector()->setCacheFile(__DIR__ . '/routes-compiled.php');
$app->run();