protected function _getCacheId() { if (Mirasvit_Fpc_Model_Config::isDebug()) { return 'CONTAINER_FPC_DEBUG_' . microtime(true); } return false; }
public function _toHtml() { if (!Mirasvit_Fpc_Model_Config::isDebug()) { return; } $processor = Mage::getSingleton('fpc/processor'); $data['Now'] = date('d.m.Y H:i:s'); $data['Request Id'] = $processor->getRequestId(); // $data['Request Cache Id'] = $processor->getRequestCacheId(); $data['Cache Id'] = $this->getCacheId(); // $data['Request Tags'] = implode(', ', $processor->getRequestTags()); $data['Can Process Request'] = $processor->canProcessRequest() ? 'Yes' : 'No'; $data['Is Allowed'] = $processor->isAllowed() ? 'Yes' : 'No'; $data['Is From Cache'] = $processor->getCache()->load($this->getCacheId()) ? 'Yes' : 'No'; $meta = $processor->getCache()->getFrontend()->getMetadatas(strtoupper($this->getCacheId())); if ($meta) { $data['Created At'] = date('d.m.Y H:i:s', $meta['mtime']); $data['Expired At'] = date('d.m.Y H:i:s', $meta['expire']); // $data['Tags'] = implode(', ', $meta['tags']); } foreach (self::$processedPlaceholders as $item) { $data['Processed Placeholders'][] = array('block' => $item->getAttribute('block'), 'template' => $item->getAttribute('template'), 'container' => $item->getAttribute('container')); } foreach (self::$inPagePlaceholders as $item) { $data['In Page Placeholders'][] = array('block' => $item->getAttribute('block'), 'template' => $item->getAttribute('template'), 'container' => $item->getAttribute('container')); } foreach (self::$defaultPlaceholders as $item) { $data['Default Placeholders'][] = array('block' => $item->getAttribute('block'), 'template' => $item->getAttribute('template'), 'container' => $item->getAttribute('container')); } if ($processor->canProcessRequest()) { return '<div style="position:fixed;bottom:5px;right:5px;border:1px solid #ccc;">' . $this->arrToTable($data) . '</div>'; } }