chore: complete update
This commit is contained in:
23
src/Framework/Cache/Commands/ClearCache.php
Normal file
23
src/Framework/Cache/Commands/ClearCache.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Cache\Commands;
|
||||
|
||||
use App\Framework\Cache\Cache;
|
||||
use App\Framework\Console\ConsoleCommand;
|
||||
use App\Framework\Console\ConsoleInput;
|
||||
use App\Framework\Console\ConsoleOutput;
|
||||
|
||||
final readonly class ClearCache
|
||||
{
|
||||
public function __construct(
|
||||
private Cache $cache,
|
||||
) {}
|
||||
|
||||
#[ConsoleCommand("cache:clear", "Clears the cache")]
|
||||
public function __invoke(ConsoleInput $input, ConsoleOutput $output): void
|
||||
{
|
||||
$this->cache->clear();
|
||||
$output->writeSuccess("Cache cleared");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user