-
Notifications
You must be signed in to change notification settings - Fork 325
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
#434 Enable Lazy service for phpredis #440
Conversation
@dkarlovi Would you be able to test it out ? (or you can just edit your vendors with this little change) |
I guess I should also edit the doc about |
The service will be lazy if symfony/proxy-manager-bridge is installed As a consequence it will allow to warmup the cache even if Redis server is not reachable fix snc#434
Doc updated |
@B-Galati I'll test it tomorrow. Would this be the correct approach? |
@dkarlovi What do you wean exactly ? From my knowledge, I do think lazy service is a good solution as it's something easy, powerful and well supported by Symfony. |
@B-Galati I mean, would making the service lazy have the desired behaviour and/or bad consequences elsewhere? From discussions at Symfony's Slack, |
@dkarlovi Thank you. Can you give the reasons behind this thinking? What would be the alternatives? I am not aware about any bad consequences for lazy services. Certainly we gonna lose some very little performances in some situation but that's all I can see. In other situation where for example, the redis client is not used like the cache warmup, performances will be better. IMHO lazy services are just an infrastructure detail. Perhaps I am wrong so please let me know for anything. |
Symfony just decided to make all doctrine listeners lazy by default in 4.2 |
@B-Galati sorry for the delay. This does indeed fix #434 (as in, allows the container to be prebuilt). There doesn't seem to be any side-effects that are noticeable to me. About lazy services, this might have been a "storm in a teacup" by a group of loud users, but the prominent opinion was lazy services are almost always a bad idea. This might be considered an exception. :) Thank you for working on this! |
@curry684 I see you've merged this, would you consider a bugfix release? |
Lazy loading for this service makes PHP 5.6 fail because of invalid cached Redis class. See #465 |
This reverts commit 2afed1d
The service will be lazy if
symfony/proxy-manager-bridge
is installedAs a consequence it will allow to warmup the cache even if Redis server is not reachable
fix #434