Skip to content

Instantly share code, notes, and snippets.

@alanef
Created November 13, 2023 22:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save alanef/3d565c5df4fd85c4dadd06b075daac28 to your computer and use it in GitHub Desktop.
Save alanef/3d565c5df4fd85c4dadd06b075daac28 to your computer and use it in GitHub Desktop.
cache
public function is_cache_plugin_installed() {
return
function_exists( 'w3tc_flush_post' ) ||
function_exists( 'wp_cache_post_change' ) ||
function_exists( 'rocket_clean_post' ) ||
has_action( 'cachify_remove_post_cache' ) ||
has_action( 'litespeed_purge_post' ) ||
function_exists( 'wpfc_clear_post_cache_by_id' ) ||
class_exists( 'WPO_Page_Cache' ) ||
has_action( 'cache_enabler_clear_page_cache_by_post' ) ||
has_action( 'breeze_clear_all_cache' ) ||
class_exists( '\comet_cache' ) ||
function_exists( 'sg_cachepress_purge_cache' ) ||
is_callable( 'wpecommon::purge_varnish_cache' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment