diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php new file mode 100644 index 00000000..72e44288 --- /dev/null +++ b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php @@ -0,0 +1,37 @@ +setName('cache:clear'); + $this->setDescription('Completely empty the cache.'); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $io = new SymfonyStyle($input, $output); + + if (cache()->clear()) { + $io->success('Cache cleared.'); + return Command::SUCCESS; + } else { + $io->error('Key wasn\'t cleared.'); + return Command::FAILURE; + } + } +} \ No newline at end of file