wp_cache_enable() WPSCache 1.0
No Hooks.
Return
Null. Nothing.
Usage
wp_cache_enable();
Code of wp_cache_enable() wp cache enable WPSCache 1.7.1
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' );
}
}
}