Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom code snippet for clearing SG Optimizer cache on child sites
<?php
// Use this snippet in the MainWP Code Snippets Extension (https://mainwp.com/extension/code-snippets/)
// Snippet Type: This Code Snippet only returns information from Child Site
if ( function_exists( 'sg_cachepress_purge_cache' ) ) {
sg_cachepress_purge_cache();
echo "Cache cleared successfully!";
} else {
echo "Clearing cache failed!";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.