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