-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Cleanup CachedContainer invalidation #3867
Conversation
staabm
commented
May 16, 2023
•
edited
Loading
edited
- centralize cache invalidation
RectorKernel::clearCache(); | ||
|
||
throw $e; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though about automatically creating a fresh uncached container in this case, but it did not yet work for me.
will look into it again in another PR
RectorKernel::clearCache(); | ||
|
||
throw new \RuntimeException( | ||
'Container cache is outdated and was cleared. please re-run the command.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets throw with a more explicit error message, so people know about the "auto-healing" capabilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can "v8" container cache be named generic name or still need increase the value?
I guess you are talking about the cache-key. using a generic string for this cache-key does not make sense. I think there is still room for improvement but as of now, it should work as far as I know. we need to try it for a bit longer to get an idea which cases are still problematic and which force us to increase the kernel-cache-key. if we have concrete repro steps we can think about how to progress further |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, lets merge it so we have faster feedback 👍
@staabm I need to revert this as I tried in CodeIgniter4 project with clear-cache and got error:
|
This reverts commit f0141af.
This reverts commit f0141af.