Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Add cache:pool:clear command#19891
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
5766a10 to04b36c0CompareKoc commentedSep 9, 2016
oh, yesterday I was thinking about it and want to create PR. You are the faster than me :D |
| if ($pool instanceof CacheItemPoolInterface) { | ||
| $pools[$id] = $pool; | ||
| } elseif ($pool instanceof CacheClearerInterface) { |
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.
should beinstanceof Psr6CacheClearer
04b36c0 to3f96928Compare| } | ||
| foreach ($clearers as $id => $clearer) { | ||
| $io->comment(sprintf('Calling cache clearer: <info>%s</info>', $id)); |
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 think the clearer/pool specific messages should be displayed only if the output is verbose and maybe a global comment should be added before e.g. "Clearing the cache for pools ...", wdyt?
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 don't know :) Doesn't look verbose to me. (Not as an exception trace e.g.). So I'll follow any advises.
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.
Sure, it's not very verbose until you have a lot of pools, I just refer to the clear cache command which hide details by default
3f96928 tob8c9c25Compare| { | ||
| $this | ||
| ->setName('cache:pool:clear') | ||
| ->setDefinition(array( |
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.
Just interesting - why not useaddArgument here?
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.
All the other commands usesetDefinition, that's the reason :)
b8c9c25 to37c5b18Comparefabpot commentedSep 14, 2016
Thank you@nicolas-grekas. |
…s-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[FrameworkBundle] Add cache:pool:clear command| Q | A| ------------- | ---| Branch? | master| New feature? | yes| Tests pass? | yes| License | MITUseful when deploying apps to get better control of cache pool clearing.Commits-------37c5b18 [FrameworkBundle] Add cache:pool:clear command
Useful when deploying apps to get better control of cache pool clearing.