Skip to content

Instantly share code, notes, and snippets.

@benjaminpick
Last active August 29, 2015 14:24
Show Gist options
  • Save benjaminpick/94b487ce995454797143 to your computer and use it in GitHub Desktop.
Save benjaminpick/94b487ce995454797143 to your computer and use it in GitHub Desktop.
Integrate Clear Cache for Me with Autoptimize
<?php
function yt_cache_enable($return) {
if (class_exists('autoptimizeCache'))
return true;
return $return;
}
add_filter('ccfm_supported_caching_exists', 'yt_cache_enable');
function yt_cache_clear() {
if (class_exists('autoptimizeCache'))
autoptimizeCache::clearall();
}
add_action('ccfm_clear_cache_for_me', 'yt_cache_clear');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment