Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid additional SQL query on option wp_crontrol_paused #92

Conversation

pierre-dargham
Copy link
Contributor

Hello John,

Ability to pause / resume events is nice, but it produces an additional (dispensable) SQL query on every page :

SELECT option_value
FROM wp_options
WHERE option_name = 'wp_crontrol_paused'
LIMIT 1

I suggest we change a few lines of code, in order to :

  • Use the autoload mechanism of core wp_options table
  • Insert the option when not existing (to ensure it is always auto-loaded)
  • Keep it in database, even when it's an empty array (to ensure it is always auto-loaded)

Bests regards,
Pierre

@johnbillion
Copy link
Owner

Merci Pierre

@johnbillion johnbillion added this to the 1.15.1 milestone Dec 16, 2022
@johnbillion johnbillion modified the milestones: 1.15.1, 1.16.0 Dec 29, 2022
@johnbillion johnbillion merged commit dc8a5ee into johnbillion:develop Mar 12, 2023
@johnbillion johnbillion modified the milestones: 1.16.0, 1.15.2 Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants