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');
$success = new \stdClass();
$value = $this->getCacheTool()->apc_fetch($key, $success);
if ($success->success) {
$output->writeln("<comment>APC key=<info>{$key}</info> has value=<info>{$value}</info></comment>");
} else {
$output->writeln("<comment>APC key=<info>{$key}</info> does not exist.</comment>");
return 1;
}
}