argument('store') ?: $cache_manager->getDefaultDriver(); $tags = $this->option('tags'); $cache = $cache_manager->store($store); if ($tags && !method_exists($cache, 'tags')) { $this->error('This cache store does not support tagging.'); return 1; } $successful = $tags ? $cache->tags($tags)->flush() : $cache->flush(); if (!$successful) { $this->error('Failed to clear cache.'); return 1; } $this->info("Application cache cleared for store [{$store}]!"); // Also clear RSX caches $this->info('Clearing RSX caches...'); Artisan::call('rsx:clean', [], $this->output); return 0; } }