Is it reading annotations of controller only when request is coming? If it so - bad...
I have next situation:
- Modules with annotations in controllers.
- In development mode or when router cache is empty - i must load all controllers (path them to loader) and use $router->addModuleResource() to provide them into router.
- After that router is saved into cache
- When by next request router is loading from cache - it has resource definitions, but not routes of this resources (i don't want to load all classes again)
So, is there a way that to store controllers route when $router->addModuleResource() is calling (read them at moment, when function called, not per request)?