diff --git a/src/CacheFallbackServiceProvider.php b/src/CacheFallbackServiceProvider.php index f07f334..c3b922d 100644 --- a/src/CacheFallbackServiceProvider.php +++ b/src/CacheFallbackServiceProvider.php @@ -4,7 +4,7 @@ use Illuminate\Cache\CacheServiceProvider; use Illuminate\Cache\MemcachedConnector; - +use Illuminate\Cache\Console\ClearCommand; class CacheFallbackServiceProvider extends CacheServiceProvider { /** @@ -48,4 +48,18 @@ public function register() $this->registerCommands(); } + /** + * Register the cache related console commands. + * + * @return void + */ + public function registerCommands() + { + $this->app->singleton('command.cache.clear', function ($app) { + return new ClearCommand($app['cache']); + }); + + $this->commands('command.cache.clear'); + } + }