wp_cache_enable()WPSCache 1.0

No Hooks.

Return

null. Nothing (null).

Usage

wp_cache_enable();

wp_cache_enable() code WPSCache 1.12.0

function wp_cache_enable() {
	global $wp_cache_config_file, $cache_enabled;

	if ( $cache_enabled ) {
		wp_cache_debug( 'wp_cache_enable: already enabled' );
		return true;
	}

	wp_cache_setting( 'cache_enabled', true );
	wp_cache_debug( 'wp_cache_enable: enable cache' );

	$cache_enabled = true;

	if ( wpsc_set_default_gc() ) {
		// gc might not be scheduled, check and schedule
		$timestamp = wp_next_scheduled( 'wp_cache_gc' );
		if ( false == $timestamp ) {
			wp_schedule_single_event( time() + 600, 'wp_cache_gc' );
		}
	}
}