I am using the Optimiseweb Cookie Notice module: http://www.magentocommerce.com/magento-connect/cookie-law-compliance-eu-uk-implied-consent-16757.html
I would need to disable the cache for the .phtml template. Here is the XML that takes care of loading the template file (as far as I understood):
<layout version="0.1.0">
<default>
<reference name="head">
<action method="addCss" ifconfig="optimisewebcookienotice/general/enabled">
<stylesheet>css/cookienotice.css</stylesheet>
</action>
</reference>
<reference name="before_body_end">
<block type="cookienotice/notice" name="optimiseweb_cookienotice" as="OptimisewebCookienotice" template="optimiseweb/cookienotice/cookienotice.phtml" />
</reference>
</default>
</layout>
Edit: After the below comments, here is what I have now:
<layout version="0.1.0">
<default>
<reference name="optimiseweb_cookienotice">
<action method="setCacheLifetime">
<s>null</s>
</action>
</reference>
<reference name="head">
<action method="addCss" ifconfig="optimisewebcookienotice/general/enabled">
<stylesheet>css/cookienotice.css</stylesheet>
</action>
</reference>
<reference name="before_body_end">
<block type="cookienotice/notice" name="optimiseweb_cookienotice" as="OptimisewebCookienotice" template="optimiseweb/cookienotice/cookienotice.phtml" />
</reference>
</default>
</layout>
Is there a way that I can force the template to be not cached?
I have tried to change the cache lifetime in the block contruct function like below but that did not work:
protected function _construct() {
$this->addData(array(
'cache_lifetime' => null
));
}
Thanks in advance for any help on this!
null
0
,null
,1
,-1
but nothing ever changed anything (I manually clear the cache after each change to be sure that my changes are reloaded).Layouts
cache type for my changes to be loaded. Refreshing thePage Cache
has no effect.