Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WP Super Cache: Simplify the preload loop and improve stopping proced…
…ures (#31022) * Simplify the preload loop * changelog * Show the "next preload" message any time it's needed. Not just when it's close to that preload time. * Remove div tags, not needed * Use wpsc_is_preload_active() for stopping Add checks to that function for the stop_preload flag, and if the mutex file is missing then return false. * Simplify stopping the preload. Remove the "preload_cache_stop" flag. * No need for two "stop" flags to stop the preload. * Reset the settings immediately, for quicker shutdown. * Catch "stop preload" flag first, then (corrected) mutex check * This will abort the preload right at the start of the function, if it's cancelled. * Reset settings if preload cancelled, instead of scheduling new task * Fix translators explanation. * No need for $mutex here, only used once * Fix missing variable * Merge with changes in #31017 * Use wpsc_is_preload_active() for "Preload now" button check * Set idle status on cancel, and remove "almost cancelled" message. There's a check on the STOP condition in each loop of the preload, so it stops very quickly now. No configuration or temp files are updated. * Check the preload counter for the "post" loop as well * Fix typo in option name --------- Co-authored-by: Peter Petrov <[email protected]>
- Loading branch information