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

7
  • thanks vivek .But it's not working Commented Oct 20, 2015 at 9:46
  • 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

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.