Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CacheStatusCommand.php
Go to the documentation of this file.
1 <?php
8 
9 use Symfony\Component\Console\Input\InputInterface;
10 use Symfony\Component\Console\Output\OutputInterface;
11 
19 {
23  protected function configure()
24  {
25  $this->setName('cache:status');
26  $this->setDescription('Checks cache status');
27  parent::configure();
28  }
29 
33  protected function execute(InputInterface $input, OutputInterface $output)
34  {
35  $output->writeln('Current status:');
36  foreach ($this->cacheManager->getStatus() as $cache => $status) {
37  $output->writeln(sprintf('%30s: %d', $cache, $status));
38  }
39  }
40 }
$status
Definition: order_status.php:8
execute(InputInterface $input, OutputInterface $output)