-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warmup lazy services #5
Comments
This is only currently possible by running through the instantiation of all services once, in a warmup script. Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment) |
So I need to write this script or it exists somewhere? Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment) |
You'll need to write a script, yup. I think its contents would be something like On Thu, 14 Feb 2019, 09:55 Witold Wasiczko <[email protected] wrote:
Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment) |
Or: public function warmup(): void
{
foreach ($this->services as $service) {
$this->container->get($service);
}
} where Anyway ready script in package will be nice addon Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment) |
Don't think we should expand the API for an edge case, and adding a script In a zendframework/zend-mvc context, that may be any of the plugin On Thu, 14 Feb 2019, 10:06 Witold Wasiczko <[email protected] wrote:
Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment) |
Or zf module ;) Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment) |
Closing, I feel this was solved in the original issue. |
Hi there!
I would like to generate all proxies before app deployment (like doctrine has
orm:generate-proxies
). Some host services (like Heroku) require to do this during "compile" process. Sure, generate on-demain works, but there is many cases when cache is purge.Originally posted by @snapshotpl at zendframework/zend-servicemanager#278
The text was updated successfully, but these errors were encountered: