I cannot find any doc that describes what the framework does with parameters after a cache:warmup
.
- Are they still read from
parameters.yml
? - Are they stored somewhere in the cache?
- Is there any difference between a development and a production environment (
debug=true|false
I mean)?
I'm using Symfony 3.4, in case the answer changes with the version.
CodePudding user response:
Symfony has a "compiled" service container.
Compilation occurs during cache warmup, so values in parameters.yml
or any other file like that will only be read during compilation, and if changed you'd need to regenerate the cache (cache:clear
).
During development, usually Symfony will recompile the container when needed. However, it's not 100% reliable, and occasionally you'll need to clear cache manually (which can be as simple as calling rm -rf /var/cache/*
, since if the container is not compiled Symfony will then compile it again).