-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
failed container cache warmer do not trigger cache re-generation on next request #11526
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
Comments
I noticed this issue while working on doctrine/DoctrinePHPCRBundle#159 |
hmm, is it a failing compiler pass or a failing cache warmer ? These are not the same thing |
ping @lsmith77 |
failing cache warmer .. |
A cache warmer is not about building the container (there is no |
yeah .. I can understand the current behavior .. I am just not sure if cache warmer authors are really aware of this. maybe in the end however this is thereforemore a documentation thing, where we need to make it very clear to Bundle authors that essentially they have no guranteed that a cache warmer has run successfully before the rest of its code is executed. |
Closing it because this can be solved via documentation as mentioned by @lsmith77. See symfony/symfony-docs#6215. |
This PR was merged into the 2.3 branch. Discussion ---------- Added a caution about failing cache warmers | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes | Applies to | all | Fixed tickets | - This was asked for in symfony/symfony#11526 Commits ------- dc62504 Added a caution about failing cache warmers
Say I have a cache warmer that fails due to an exception. The container is already written, so on the next request the cache warmer is not triggered again.
I wonder if we need to somehow ensure that in such cases the entire cache is considered tainted so that it gets regenerated on the next request?
Right now I think Bundle developers assume that their compiler passes have executed without error and therefore do not handle the case when they may have failed due to an exception.
The text was updated successfully, but these errors were encountered: