Closed Vinai closed 4 years ago
I've added an experimental API with exported functions to be called from custom code in release 1.0.24. More info can be found here: https://github.com/mage2tv/magento-cache-clean/blob/master/doc/using-via-code.md
I would appreciate some feedback how it works out for you. Thanks!
Very cool!
Note to self: also add function exports for clearing cache by tags or cache ids.
I've decided to remove the stateful external API.
Instead of set_base_dir
, set_log_level
and watch
, I'll only expose a single method
watch(baseDir, logLevel)
.
Any state will be managed internally. This will make future internal changes simpler.
I'll also add methods to clear all caches, or clear by cache tag or cache id:
cleanTags(baseDir, ...tags)
cleanIds(baseDir, ...ids]
cleanAll(baseDir)
API and documentation updated, will be reflected in the upcoming release 1.0.25.
https://github.com/mage2tv/magento-cache-clean/blob/master/doc/using-via-code.md
I'm happy with the new API and the documentation. If there is anything I could improve, please let my know by opening another issue.
In Slack from @paales: