CacheTool\Command\ApcKeyExistsCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->ensureExtensionLoaded('apc');
        $key = $input->getArgument('key');
        $value = $this->getCacheTool()->apc_exists($key);
        if ($value) {
            $output->writeln("<comment>APC key=<info>{$key}</info> exists</comment>");
        } else {
            $output->writeln("<comment>APC key=<info>{$key}</info> does not exist.</comment>");
            return 1;
        }
    }
ApcKeyExistsCommand