0

I am facing a very big problem in magento regarding cache, I am using 1.7 version of magento and I have a file where I am checking page title but result is correct only on first hit.And after that the old cache result. How do I resolve it?

1 Answer 1

0

use this code

$this->getLayout()->getBlock('head')->getTitle();

you can use this code in your phtml file

6
  • Still it is returning old value? Commented Oct 20, 2015 at 9:46
  • yes it is returning same value Commented Oct 20, 2015 at 9:47
  • Actually header and footers are set via cache in magento Try disabling the cache then it will respond you the correct title Commented Oct 20, 2015 at 9:48
  • if i disable the cache then it will effect on my site speed.. i think you know this.. Commented Oct 20, 2015 at 9:53
  • Then you have to disable cache for a particular block here is a link how you can do that magikcommerce.com/blog/… Without disabling it wont be possible Commented Oct 20, 2015 at 10:09

Your Answer

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.