wpsc_schedule_next_preload()WPSCache 1.0

Schedule the next preload event without resetting the preload counter. This happens when the next loop of an active preload is scheduled.

Хуков нет.


null. Ничего (null).



Код wpsc_schedule_next_preload() WPSCache 1.10.0

function wpsc_schedule_next_preload() {
	global $cache_path;

	 * Edge case: If preload is not active, don't schedule the next preload.
	 * This can happen if the preload is cancelled by the user right after a loop finishes.
	if ( ! wpsc_is_preload_active() ) {
		wp_cache_debug( 'wpsc_schedule_next_preload: preload is not active. not scheduling next preload.' );

	if ( defined( 'DOING_CRON' ) ) {
		wp_cache_debug( 'wp_cron_preload_cache: scheduling the next preload in 3 seconds.' );
		wp_schedule_single_event( time() + 3, 'wp_cache_preload_hook' );

	// we always want to delete the mutex file, even if we're not using cron
	$mutex = $cache_path . 'preload_mutex.tmp';
	wp_delete_file( $mutex );