I tried this for catalog/product_price block, but I'm getting:
Fatal error: Call to a member function getCacheIdTags() on a non-object in /var/www/html/app/code/core/Mage/Catalog/Block/Product/Price.php on line 176
Any ideas?
<?xml version="1.0" encoding="UTF-8"?>
<config>
<placeholders>
<catalog_product_price>
<block>catalog/product_price</block>
<placeholder>TEST_CACHE</placeholder>
<container>Test_PageCache_Model_Container_Cache</container>
<cache_lifetime>0</cache_lifetime>
</catalog_product_price>
</placeholders>
</config>
And my Container
class Test_PageCache_Model_Container_Cache extends Enterprise_PageCache_Model_Container_Abstract{
protected function _getCacheId()
{
return 'TEST_CACHE' . md5($this->_placeholder->getAttribute('cache_id'));
}
protected function _renderBlock()
{
$blockClass = $this->_placeholder->getAttribute('block');
$template = $this->_placeholder->getAttribute('template');
$block = new $blockClass;
$block->setTemplate($template);
return $block->toHtml();
}
protected function _saveCache($data, $id, $tags = array(), $lifetime = null) { return false; }}
I have FPC enabled to check this, but when I refresh the page where the block is, I'm getting the aftermentioned error.
Thanks