Add clear cache on updates functionality#5
Add clear cache on updates functionality#5filipmanzi wants to merge 4 commits intocloudpanel-io:masterfrom
Conversation
|
Thanks for adding this. I've started using this update and it's been great. |
|
Hey @BenJamesAndo! Awesome that you liked it, and thanks for the feature request. I'll try to implement such functionality sometime, if no one else gets to it before me. |
|
Hey! The codebase has been updated to include a new functionality within the settings: the option to clear cache following updates to posts and pages. Additionally, modifications have been made to the existing feature that clears the cache upon WordPress Core updates. These adjustments now accommodate third-party management systems, including ManageWP. In order to make this work, I've shifted some logic outside of the admin class. My recommendation to repo maintainers is to restructure some of the classes and maybe add a class for functions that do not have to do with admin functions. Then it would be possible to move my contributed code into a class in order to keep up with the OOP principles in main branch. Let me know what you think :) |
|
Hey, thanks for also adding in clear on post or page update. Is there an easy way to verify it's working? I checked the X-Cache-Age and it keeps increasing instead of resetting to 0 after I update a page or post. Is it designed to clear the cache even when using Elementor or updating a custom post type? |
|
Hi, did we ever get official confirmation of this working? |
|
Hey guys, recently i was facing issue on my WordPress websites, hosted on CloudPanel + Varnish. Unfortunately, cloudpanel WordPress plugin was unable to purge cache on post update, even on new post, sitemap was not updating. I have made a PR with changes implemented. lets see! |
Added functionality to let CloudPanel Plugin clear host cache automatically when a theme, plugin or WordPress core update has finished. Especially helpful for website owners using theme builders such as Elementor.
Handling feature request in issue #4
Edit 14 feb: I refactored some of the code to follow the existing code style of the plugin (Object oriented programming).