We have used full page cache but some particular part of section not reflected. for example, we have a select city in the dropdown but not reflected. check my site- https://vidyutbazar.com/ A different way to disable it but not work for me.check below code.

Path = frontend/YOURTHEME/default/template/catalogsearch/form.mini.phtml
Block = Mage_Core_Block_Tem

<reference name="Mage_Core_Block_Tem">
  <action method="setCacheLifetime"><s>null</s></action>

<reference name="top.search">
  <action method="setCacheLifetime"><s>null</s></action>

<reference name="top.bar">
  <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml">
    <action method="unsCacheLifetime"></action>

I need to disable cache for this block.so i use above code in this layout but it is not work for me.Please help me how to disable it?

1 Answer 1


You can try it with .htaccess by using code like this:

<FilesMatch "path_to_your_file\.phtml$">
    <IfModule mod_expires.c>
        ExpiresActive Off
    <IfModule mod_headers.c>
        FileETag None
        Header unset ETag
        Header unset Pragma
        Header unset Cache-Control
        Header unset Last-Modified
        Header set Pragma "no-cache"
        Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
        Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"

Source: https://www.inmotionhosting.com/support/website/htaccess/disable-caching-htaccess

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.