CacheTool\Command\ApcKeyStoreCommand::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 = $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;
    }
ApcKeyStoreCommand