wp_super_cache_disable()
No Hooks.
Return
null
. Nothing (null).
Usage
wp_super_cache_disable();
wp_super_cache_disable() wp super cache disable code WPSCache 1.12.4
function wp_super_cache_disable() { global $cache_path, $supercachedir, $wp_cache_config_file, $super_cache_enabled; if ( ! $super_cache_enabled ) { wp_cache_debug( 'wp_super_cache_disable: already disabled' ); return true; } wp_cache_setting( 'super_cache_enabled', false ); wp_cache_debug( 'wp_super_cache_disable: disable cache' ); $super_cache_enabled = false; if ( ! $supercachedir ) { $supercachedir = get_supercache_dir(); } if ( is_dir( $supercachedir ) ) { @rename( $supercachedir, $supercachedir . '.disabled' ); } sleep( 1 ); // allow existing processes to write to the supercachedir and then delete it if ( function_exists( 'prune_super_cache' ) && is_dir( $supercachedir ) ) { prune_super_cache( $cache_path, true ); } if ( $GLOBALS['wp_cache_mod_rewrite'] === 1 ) { remove_mod_rewrite_rules(); } }