protected function execute(InputInterface $input, OutputInterface $output)
{
$this->ensureExtensionLoaded('apc');
$key = $input->getArgument('key');
$value = $input->getArgument('value');
$ttl = $input->getArgument('ttl');
$success = $this->getCacheTool()->apc_store($key, $value, $ttl);
if ($output->isVerbose()) {
if ($success) {
$output->writeln("<comment>APC key <info>{$key}</info> was stored with value=<info>{$value}</info> and ttl=<info>{$ttl}</info></comment>");
} else {
$output->writeln("<comment>APC key <info>{$key}</info> could not be stored.</comment>");
}
}
return $success ? 0 : 1;
}