protected function execute(InputInterface $input, OutputInterface $output)
{
$this->detectMagento($output, true);
if (!$this->initMagento()) {
return;
}
if ($input->hasOption('fpc') && $input->getOption('fpc')) {
if (!class_exists('\\Enterprise_PageCache_Model_Cache')) {
throw new RuntimeException('Enterprise page cache not found');
}
$cacheInstance = \Enterprise_PageCache_Model_Cache::getCacheInstance()->getFrontend();
} else {
$cacheInstance = \Mage::app()->getCache();
}
/* @var $cacheInstance \Varien_Cache_Core */
$cacheData = $cacheInstance->load($input->getArgument('id'));
if ($input->getOption('unserialize')) {
$cacheData = unserialize($cacheData);
$cacheData = print_r($cacheData, true);
}
$output->writeln($cacheData);
}