wpsc_update_idle_preload()
Update the preload status to indicate it is idle. If a finish time is specified, store it.
No Hooks.
Return
null
. Nothing (null).
Usage
wpsc_update_idle_preload( $finish_time );
- $finish_time **
- -
Default: null
wpsc_update_idle_preload() wpsc update idle preload code WPSCache 1.12.4
function wpsc_update_idle_preload( $finish_time = null ) { $preload_status = wpsc_get_preload_status(); $preload_status['running'] = false; $preload_status['history'] = array(); if ( ! empty( $finish_time ) ) { $preload_status['previous'] = $finish_time; } $filename = wpsc_get_preload_status_file_path(); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents if ( false === file_put_contents( $filename, wp_json_encode( $preload_status ) ) ) { wp_cache_debug( "wpsc_update_idle_preload: failed to write to $filename" ); } }