Purge cache programmatically
-
Hello,
I am creating a webhook function and I need a way to clear all the cached assets programmatically, the plugins uses the clearAllCache function in WpAssetCleanUp\OptimiseAssets\OptimizeCommon but I can’t make it work inside my function.
Note that I need to purge everything because the webhook is run once I update code like .js or .css, thanks.What I have so far is:
function clear_cache_all( $return_args, $identifier, $response_body ){ $custom_action = new WpAssetCleanUp\OptimiseAssets\OptimizeCommon; $foo = $custom_action->clearAllCache(false); // the assets are never purged return $return_args; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Purge cache programmatically’ is closed to new replies.