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

[5.4] Add cache forget command and use it in the event Schedule #16201

Merged
merged 7 commits into from
Nov 1, 2016
Merged

[5.4] Add cache forget command and use it in the event Schedule #16201

merged 7 commits into from
Nov 1, 2016

Conversation

themsaid
Copy link
Member

Instead of forgetting the cache key directly after running the command (which can be run in the background), we use a cache:forget console command that'll run after our command runs, this ensure the cache is cleared after the command actually finished running.


$this->phpBinary = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));

$this->artisan = defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to extract this to some static method on a class or something that way we don't have to do all this just to pass a command name into the event class.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it seems like we should be able to call like Something('cache:forget') and receive back a fully formatted call to php artisan cache:forget.

@taylorotwell taylorotwell merged commit 969e421 into laravel:master Nov 1, 2016
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

Successfully merging this pull request may close these issues.

2 participants