setDescription('Empty cache directories, clear Memcached, Redis if avalaible'); return $this; } 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 ($this->container['phraseanet.configuration-tester']->isInstalled()) { $this->getService('phraseanet.cache-service')->flushAll(); } $output->write('Finished !', true); return 0; } }