Clear the Cache by Calling the Function Hook

You can delete the cache by calling the function.

You can delete the cache and minified css&js sources. You need to add “true” argument into deleteCache(true)

and You can delete the cache of a post by calling the function.

You can run your function after clearing cache with add_action() method.