Magento – Preventing specific section of home page from being cached Magento CE 1.9

cachemagento-1.9

I've been able to prevent caching of my footer and some other sections, but am having trouble doing so with one specific section of my home page. On my home page, the section in question is called using:

{{block type="core/template" name="homepage-highlights" alias="homepage-highlights" template="jl/homepage/homepage-highlights.phtml"}}

In my local.xml file, I already have another section defined:

<cms_index_index>

    <reference name="root">
         <block type="core/template" name="homepage-billboardSection" as="homepage-billboardSection" template="jl/homepage/homepage-billboardSection.phtml" />
         <action method="setBlockId"><block_id>homepage-billboardSection</block_id></action>
    </reference>

    <reference name="homepage-billboardSection">
        <block type="core/template" name="billboard" as="billboard" template="jl/modules/billboard/billboard.phtml" >
        <action method="setBlockId"><block_id>billboard</block_id></action>
        </block>
    </reference>

</cms_index_index>

The phtml file that contains what I'm trying to exclude from getting cached is in

jl/homepage/homepage-highlights.phtml

I was able to disable caching of the footer by adding:

<reference name="footer">
    <block type="core/template" name="js_files" template="page/html/js.phtml"/>
    <action method="unsetData">
       <key>cache_lifetime</key>
    </action>
</reference>

to local.xml but I'm not seeing how to do the same for this section of my home page. Any thoughts would be welcomed.

Best Answer

{{block type="core/template" name="homepage-highlights" alias="homepage-highlights" template="catalog/navigation/left.phtml" cache_lifetime="false"}}

just add new parameter cache_lifetime="false" at end of default parameters

Related Topic