5

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>
<reference name="top.search">
 <action method="setCacheLifetime"><s>null</s></action>
 </reference>
<reference name="top.bar">
 <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml">
 <action method="unsCacheLifetime"></action>
 </block>
 </reference>

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?

sv3n
11.7k7 gold badges44 silver badges75 bronze badges
asked Sep 19, 2018 at 7:40

1 Answer 1

0

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

<FilesMatch "path_to_your_file\.phtml$">
 <IfModule mod_expires.c>
 ExpiresActive Off
 </IfModule>
 <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"
 </IfModule>
</FilesMatch>

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

answered Sep 19, 2018 at 18:04

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.