-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Feedback in cache:clear #9463
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
Feedback in cache:clear #9463
Conversation
I suggest displaying these additional messages only in verbose mode |
@stof I changed it so that the messages are only shown in verbose + I added a ":" after the default start message |
@@ -77,9 +78,11 @@ protected function execute(InputInterface $input, OutputInterface $output) | |||
$warmupDir = substr($realCacheDir, 0, -1).'_'; | |||
|
|||
if ($filesystem->exists($warmupDir)) { | |||
$this->writelnIfVerbose($output, 'Clearing outdated warmup directory...'); |
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.
leave a space after directory
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.
nope
Better start using PHPCS before doing a pull request ^_^. I guess I will have to make a different brance to add the updates and i'll run phpcs. |
* @param OutputInterface $output | ||
* @return bool | ||
*/ | ||
protected function isVerbose(OutputInterface $output){ |
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.
same here
This PR does more than changing the |
@ConneXNL Can you clean up this PR? |
@@ -87,9 +90,41 @@ protected function execute(InputInterface $input, OutputInterface $output) | |||
sleep(1); // workaround for windows php rename bug | |||
} | |||
$filesystem->rename($warmupDir, $realCacheDir); | |||
$this->writelnIfVerbose($output, 'Warm up completed...'); |
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 you need to remove the 3 dots.
Closing in favor of #9966 |
This PR was merged into the 2.5-dev branch. Discussion ---------- added feedback to the cache:clear command simplified version of #9463 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #9463 | License | MIT | Doc PR | n/a "Especially in production it is sometimes critical to know exactly when your cache is cleared or warmed up. Currently cache:clear provides no feedback whats however. As sites get bigger, so become their cache files. Removing old cache files may sometimes even take minutes. Without any feedback from the cache:clear you do not know the current status. That's why i added more feedback to the cache:clear command that it makes it possible to see when your cache is warmed up and ready to go." Commits ------- f2261da [FrameworkBundle] simplified code a1f6411 [FrameworkBundle] added feedback in cache:clear
Especially in production it is sometimes critical to know exactly when your cache is cleared or warmed up. Currently cache:clear provides no feedback whats however. As sites get bigger, so become their cache files. Removing old cache files may sometimes even take minutes. Without any feedback from the cache:clear you do not know the current status.
That's why i added more feedback to the cache:clear command that it makes it possible to see when your cache is warmed up and ready to go.