cakephp: RFC proposal - Cache shell for cache invalidation/removal
Hello.
It be good to be able to have the means to clear caches out of the box with a one-liner.
I know you can use Cache::clear(true); or Cache::clear(false); (and the orm_cache shell for query cache) but this RFC is not about that. It is about providing such functionality in a Shell bundled with the framework so at the end one could: cake cache clear --all for example.
This would be of good use as a deployment step. All this RFC is about is creating a Cache Shell with the one clear method that just calls Cache::clear(). Of course we can add all kinds of options like: clear only expired cache, clear all cache, clear only specific sections rather than everything and so forth.
It may not be a separate cache shell - it could be a part of a bigger “Utility Shell” that could contain all kinds of deployment or framework maintenance stuff like this.
What is the Core Team’s opinion on this? No doubt in my mind that such a thing has been discussed. I am not asking the core team to develop this - If there is approval for it I am going to submit a pull request .
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 30 (18 by maintainers)
Commits related to this issue
- Merge pull request #8900 from chris48s/7368-cache-shell Add shell command for clearing caches (refs #7368) — committed to cakephp/cakephp by markstory 8 years ago
Aside from documenting, I think it would be nice if the shell would inform users about APC limitations/expectations when
ApcEngineis detected (shell will only clear cli cache, not web server cache).Maybe even suggest to gracefully reload their web server if they persist on clearing web server cache from cli.Took me half a day to realize 😱
I thought there were 3? Or did you forget off by one errors :trollface: