yireo / magento2-autoflushcache
Fund package maintenance!
yireo
www.paypal.me/yireo
Installs: 10 093
Dependents: 0
Suggesters: 0
Security: 0
Stars: 26
Watchers: 6
Forks: 5
Open Issues: 1
Type:magento2-module
Requires
- php: >=8.0
- magento/framework: ^100.1|^101.0|^102.0|^103.0
Requires (Dev)
- composer/composer: *@dev
- phpunit/phpunit: *
This package is auto-updated.
Last update: 2024-10-27 12:37:54 UTC
README
Magento 2 module to automatically flush the cache whenever you save something in the System Configuration.
Do NOT use this in production.
Overview
When saving the System Configuration within Magento 2, the core behaviour is to add a reminder in the backend that you should manually flush the cache. In production, this is a good practice: Instead of flushing the cache with every change, the cache is only flushed when needed. In development, I always keep caching on, and then this becomes annoying. This module automatically flushes the cache for you.
Installation
Install this module within Magento 2 using composer:
composer require yireo/magento2-autoflushcache --dev
bin/magento module:enable Yireo_AutoFlushCache
Technical architecture
This module listens to the event
controller_action_postdispatch_adminhtml_system_config_save
. Whenever
it is called, it flushes the following caches:
config
block_html
full_page