mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 21:56:33 +02:00
feat(console): add CacheDeleteCommand #543
This commit is contained in:
@@ -12,7 +12,6 @@ namespace Flextype\Console\Commands\Cache;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
||||
class CacheDeleteCommand extends Command
|
||||
@@ -26,8 +25,6 @@ class CacheDeleteCommand extends Command
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$key = $input->getArgument('key');
|
||||
|
||||
if (cache()->delete($key)) {
|
||||
|
@@ -20,6 +20,7 @@ use Flextype\Console\Commands\Entries\EntriesHasCommand;
|
||||
use Flextype\Console\Commands\Cache\CacheDeleteCommand;
|
||||
use Flextype\Console\Commands\Cache\CacheSetCommand;
|
||||
use Flextype\Console\Commands\Cache\CacheGetCommand;
|
||||
use Flextype\Console\Commands\Cache\CacheClearCommand;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
@@ -38,6 +39,7 @@ class FlextypeConsoleApplication extends ConsoleApplication
|
||||
console()->add(new CacheSetCommand());
|
||||
console()->add(new CacheGetCommand());
|
||||
console()->add(new CacheDeleteCommand());
|
||||
console()->add(new CacheClearCommand());
|
||||
|
||||
parent::run();
|
||||
}
|
||||
|
Reference in New Issue
Block a user