I'm trying to write something that automatically clears cache on magento, when user hits Save, on any pages under Backend / Stores / Configuration.

I'm only looking for the proper event to hook into for this function.


Edit: Or any tips on adding a Save And Clear button.

1 Answer 1



Check save method. Following event dispatch:

    ['website' => $this->getWebsite(), 'store' => $this->getStore()]

Ex. For catalog section event should be: admin_system_config_changed_section_catalog

  • If I use that event for clearing cache, is $this->_appConfig->reinit(); (a few lines after) gonna interfere in any way ?
    – Mac A.
    Jul 17, 2019 at 16:15
  • You can use $this->_appConfig->reinit() for clearing config cache. more detail vendor/magento/framework/App/Config.php::clean
    – Sohel Rana
    Jul 17, 2019 at 16:24

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.