How to Clear Cache on WordPress

In a project, we needed to clear all cache while saving a custom post type, but how we didn’t know that cache plugin the customer going to use then we did a script that works in the most popular cache plugins.

We use the save_post  hook to do the script, but it too works in init  hook.

 

 

Use it wisely 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top