Skip to content

Instantly share code, notes, and snippets.

@andergmartins
Forked from alanef/class-utilities.php
Created November 17, 2023 18:39
Show Gist options
  • Save andergmartins/d4cd3b52638f119a55bb6f2b6eb5330a to your computer and use it in GitHub Desktop.
Save andergmartins/d4cd3b52638f119a55bb6f2b6eb5330a 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