-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.0] Add argument to cache:clear to specify store name. #7930
Conversation
$this->cache->flush(); | ||
try { | ||
$cacheStore = $this->cache->store($storeName); | ||
} catch (\InvalidArgumentException $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.
Don't catch this.
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.
What's the advantage to letting it bubble instead of displaying a succinct message to the user?
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.
The message should already be succinct?
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.
For example, we throw an exception when a command is not found, and that's totally readable.
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.
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 forgot how exceptions were rendered out, that's perfect. I'll change it.
6ea0a5e
to
f1c12d6
Compare
Try/catch block removed. |
[5.0] Add argument to cache:clear to specify store name.
Sorry about the delay. This is #7893 retargeted for 5.0.
This adds an argument to the
cache:clear
command so that you can specify the store that will be cleared. If nothing is passed it will clear the default store as it normally does. Tests included.