The question is quite simple, can I generate the FastRoute cache manually somehow, before the project starts and it starts generating everything that is configured by itself? Due to the fact that up to 30,000 thousand requests per second come to the site, this creates the problem that the cache begins to be generated by several threads at once, and one tries to overwrite the other, as a result, a broken file turns out, you have to delete the broken file so that it is generated again correctly. Can you tell me how I can get around the problem?
Hello and welcome to our forums!
As far as I can remember, this functionality does not exist in mezzio-fastroute or FastRoute.
Maybe this example can help to find a solution:
I don’t know if anyone has faced a similar problem. But the solution for us turned out to be that when building, we call a script from the CLI that simulates a GET request to the application and after that a cache file is generated at the deployment stage.