Skip to content

[WP Super Cache] Add specific time scheduling to Preload#47018

Open
zeus2611 wants to merge 2 commits intoAutomattic:trunkfrom
zeus2611:update/wpsc-preload-schedule
Open

[WP Super Cache] Add specific time scheduling to Preload#47018
zeus2611 wants to merge 2 commits intoAutomattic:trunkfrom
zeus2611:update/wpsc-preload-schedule

Conversation

@zeus2611
Copy link

@zeus2611 zeus2611 commented Feb 7, 2026

Fixes #46754

Proposed changes:

  • Feature: Added a "Scheduler" option to the Preload settings, allowing users to choose between "Timer" (Interval) and "Clock" (Specific Time).
  • UI: Ported the "Clock" UI selector from the Garbage Collection settings to the Preload tab for consistency.
  • Logic: Updated wp-cache-preload.php to correctly schedule the wp_cache_preload_hook event at a specific daily time when "Clock" mode is selected.
  • Goal: This allows server administrators to schedule resource-intensive preloading during off-peak hours (e.g., 03:00 AM) to minimize impact on site performance.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

N/A (Community contribution fixing a GitHub issue).

Does this pull request change what data or activity we track or use?

No. This change only affects the internal scheduling of cache preloading.

Testing instructions:

  1. Setup: Install and activate WP Super Cache (or use the local dev environment).
  2. Navigate: Go to Settings > WP Super Cache > Preload tab.
  3. Verify UI: Confirm there is now a "Scheduler" section with "Timer" and "Clock" radio buttons.
  4. Test Clock Mode:
    • Select "Clock".
    • Enter a time shortly in the future (e.g., if it is 14:00, enter 14:05).
    • Click Save Settings.
    • Verification: Use a plugin like WP Crontrol to verify that wp_cache_preload_hook is scheduled for 14:05 today (or tomorrow if the time passed).
  5. Test Timer Mode:
    • Select "Timer".
    • Enter an interval (e.g., 600 minutes).
    • Click Save Settings.
    • Verification: Confirm the hook is scheduled to run based on the interval.

@github-actions github-actions bot added the [Plugin] Super Cache A fast caching plugin for WordPress. label Feb 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖



Super Cache plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions bot added the OSS Citizen This Pull Request was opened by an Open Source contributor. label Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OSS Citizen This Pull Request was opened by an Open Source contributor. [Plugin] Super Cache A fast caching plugin for WordPress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement:Time specific preload in wp-super cache

1 participant