setDescription('Empty cache directories, clear Memcached, Redis if avalaible'); return $this; } public function requireSetup() { return false; } protected function doExecute(InputInterface $input, OutputInterface $output) { $finder = new Finder(); $finder ->exclude('.git') ->exclude('.svn') ->in(array( __DIR__ . '/../../../../tmp/cache_minify/', __DIR__ . '/../../../../tmp/cache_twig/' )); $filesystem = new Filesystem(); $filesystem->remove($finder); if (setup::is_installed()) { $Core = \bootstrap::getCore(); $Core['CacheService']->flushAll(); } $output->write('Finished !', true); return 0; } }