I'm trying to stop my header from being cached on my onestepcheckout page so we can remove large amounts of content and streamline the checkout. I've added a check to see if the current page is the checkout, if not it will output the content.

This all works fine, until I enable the cache. I've tried changing my checkout.phtml to echo $this->getChildHtml('header', false); but this did not work.

I've also tried to disable the headers cache in my local.xml file, but this again has not worked.

<reference name="header">
   <action method="unsetData"><key>cache_lifetime</key></action>
   <action method="unsetData"><key>cache_tags</key></action>

I'm not sure what I'm doing wrong, these seem to be the 2 methods that I've seen online for this and can't find anything that specifically refers to the header, and a lot talk about having to make custom modules to output the template content, I am sure there must be a simpler solution.

I'm running Magento 1.9.

1 Answer 1


cache_lifetime must be set to null to disable cache for this block

<reference name="header">
    <action method="setCacheLifetime">
  • I've added this but it doesn't seem to be working. I've cleared the cache, flushed the cache and cache storage. Does this need to be used in conjunction with any other method? Commented Apr 30, 2015 at 8:43
  • i have rechecked the code and it is working for me. issue could be in your local.xml . Try to check your handles. For example try to add one more block to header in this handle to see if it is applied. Commented Apr 30, 2015 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.