Skip to content
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

drush cr (or drush cache:rebuild) does not print informative messages similar to drush deploy #6201

Open
alirezatc opened this issue Jan 6, 2025 · 0 comments

Comments

@alirezatc
Copy link

Describe the bug
The drush cache:rebuild command is functional but lacks informative output compared to the drush deploy command. When running drush cr, users do not see detailed messages about the cache rebuild process, making it less clear whether the operation succeeded or encountered issues.

In contrast, drush deploy provides helpful messaging during its execution, enhancing the user experience. It would be beneficial if drush cr could also output useful info such as messages, when the rebuild starts and ends, to align with the user experience of other commands like drush deploy.

I was trying to read the documentation on the site and figure out what are the differences between these two commands. drush deploy and drush cr, but no luck.

To Reproduce
Run drush cr in a Drupal project:
drush cr
Observe the the only message is Cache rebuild complete.
Compare this with the output of drush deploy:
drush deploy

Expected behavior
Getting similar results when running them.

Actual behavior
drush cr lacks using messenger service.

System Configuration

Q A
Drush version 13.3.3.0
Drupal version 10.3.10
PHP version 8.3.14
OS macOS 15.2 (24C101)

Additional information
I have created a Drupal contrib module called cache flush time to print out the last time Drupal cache was rebuilt. This is achievable via going to site/admin/config/development/performance and pressing Clear all caches or running drush deploy. However, when running drush cr nothing prints out.
When using drush cr:
[success] Cache rebuild complete.
When using drush deploy:

 [notice] Database updates start.
>  [success] No pending updates.
>  [notice] Message: Cache flushed at 2025-01-06 - 15:28
>
>  [notice] Message: Redis FlushDB executed for Redis database index 0
>
 [success] Config import start.
>  [notice] Finalizing configuration synchronization.
>  [success] The configuration was imported successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant