8000 failed container cache warmer do not trigger cache re-generation on next request · Issue #11526 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
lsmith77 opened this issue Jul 31, 2014 · 7 comments
Closed

Comments

@lsmith77
Copy link
Contributor

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.

@lsmith77
Copy link
Contributor Author

I noticed this issue while working on doctrine/DoctrinePHPCRBundle#159

@stof
Copy link
Member
stof commented Aug 14, 2014

hmm, is it a failing compiler pass or a failing cache warmer ? These are not the same thing

@stof
Copy link
Member
stof commented Aug 18, 2014

ping @lsmith77

@lsmith77
Copy link
Contributor Author

failing cache warmer ..

@lsmith77 lsmith77 changed the title failed container compiler passes do not trigger cache re-generation on next request failed container cache warmer do not trigger cache re-generation on next request Aug 18, 2014
@stof
Copy link
Member
stof commented Aug 18, 2014

A cache warmer is not about building the container (there is no container cache warmer). Each cache warmer is about building its own part of the cache (the router cache warmer dumps the cached router for instance). The fact that the cache is regenerated on the next request or no depends of how this cached content is used.
But there is no reason to trigger a regeneration of the whole cache on next request IMO.

@lsmith77
Copy link
Contributor Author

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.

@javiereguiluz
Copy link
Member

Closing it because this can be solved via documentation as mentioned by @lsmith77. See symfony/symfony-docs#6215.

xabbuh added a commit to symfony/symfony-docs that referenced this issue Feb 7, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0