File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
src/Illuminate/Cache/Console Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -50,24 +50,21 @@ public function __construct(CacheManager $cache)
50
50
*/
51
51
public function handle ()
52
52
{
53
- $ storeName = $ this ->hasArgument ('store ' ) ? $ this ->argument ('store ' ) : null ;
54
- $ tagsNames = $ this ->hasOption ('tags ' ) ? $ this ->option ('tags ' ) : null ;
53
+ $ tags = (array ) explode (', ' , $ this ->option ('tags ' ));
55
54
56
- $ store = $ this ->cache ->store ($ storeName );
55
+ $ cache = $ this ->cache ->store ($ store = $ this -> argument ( ' store ' ) );
57
56
58
- $ this ->laravel ['events ' ]->fire ('cache:clearing ' , [$ storeName , $ tagsNames ]);
57
+ $ this ->laravel ['events ' ]->fire ('cache:clearing ' , [$ store , $ tags ]);
59
58
60
- if (! is_null ($ tagsNames )) {
61
- $ store ->tags (explode (', ' , $ tagsNames ))->flush ();
62
-
63
- $ this ->info (sprintf ('Application cache tags "%s" cleared! ' , $ tagsNames ));
59
+ if (! empty ($ tags )) {
60
+ $ cache ->tags ($ tags )->flush ();
64
61
} else {
65
- $ store ->flush ();
66
-
67
- $ this ->info ('Application cache cleared! ' );
62
+ $ cache ->flush ();
68
63
}
69
64
70
- $ this ->laravel ['events ' ]->fire ('cache:cleared ' , [$ storeName , $ tagsNames ]);
65
+ $ this ->info ('Cache cleared successfully. ' );
66
+
67
+ $ this ->laravel ['events ' ]->fire ('cache:cleared ' , [$ store , $ tags ]);
71
68
}
72
69
73
70
/**
You can’t perform that action at this time.
0 commit comments