1
0
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:
Awilum
2021-09-21 13:44:25 +03:00
parent abebcf993e
commit 5f0ce1684a
2 changed files with 2 additions and 3 deletions

View File

@@ -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)) {

View File

@@ -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();
}