Apr 24, 2018

How to clear/invalidates configuration | config | getStoreConfig cache programatically in Magento

How to clearinvalidates configuration  config  getStoreConfig cache programatically in Magento

Magento generally cached all configuration values which we saved from admin or programatically.

If we changed old configuration attribute value with new value and it seems that while fetching value Magento returned old value instead of new the reason behind this Magento cached configuration values on the server.

We can refresh cache by using reinit method before fetching value, Please see example below.


Mage::app()->getConfig()->reinit(); //to clear/invalidates configuration cache

$getConfigValue = Mage::getStoreConfig('test/testSetting/testID');

No comments:

Post a Comment