wp_cache_enable()
No Hooks.
Returns
null. Nothing (null).
Usage
wp_cache_enable();
wp_cache_enable() wp cache enable code WPSCache 3.1.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' );
}
}
}