How to write custom config data to cache?
-
16-10-2019 - |
سؤال
The scenario is like this. I want to programmatically change config data and write those values to cache. I know changing config data through programmatically is possible and how to do. But how can I write those changed config values to cache?
Any suggestions will be appreciated.
Thanks in advance.
المحلول
If you have the cache for config enabled those values will be automatically cached.
Just make sure you clear the config cache after you modify your values:
Mage::app()->getCacheInstance()->cleanType('config');
لا تنتمي إلى magento.stackexchange