setDescription('Empties cache directories and cache-server data'); return $this; } protected function doExecute(InputInterface $input, OutputInterface $output) { $finder = new Finder(); $in = $this->container['cache.paths']->getArrayCopy(); $finder ->exclude('.git') ->exclude('.svn') ->in($in); $this->container['filesystem']->remove($finder); if ($this->container['phraseanet.configuration-tester']->isInstalled()) { $this->getService('phraseanet.cache-service')->flushAll(); } $output->write('Finished !', true); return 0; } }