Follow

Does your Full Page Cache support custom blocks?

Yes, our Full Page Cache can support your custom blocks with a little php code and layout xml.  Below is a simple example that will work in most cases.

First create the following file: app/code/local/Brim/PageCache/Model/Container/Default.php 

NOTE: As of version 2.1.4 the container is included with the extension.

<?php
class Brim_PageCache_Model_Container_Default extends Brim_PageCache_Model_Container_Abstract 
{
    protected function _getCacheId() {
        return false;
    }
}

 

Then using layout xml you can associate this container with a custom block.  A single container maybe used with multiple blocks.

<reference name="#BLOCK-KNAME-HERE#"> 
<action method="setDynamicBlockContainer"><container>brim_pagecache/container_default</container></action> 
</reference>
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk