Skip to content

Schedule Option Handler Purges#125

Merged
wpscholar merged 1 commit intobluehost:masterfrom
arunshenoy99:master
Feb 4, 2025
Merged

Schedule Option Handler Purges#125
wpscholar merged 1 commit intobluehost:masterfrom
arunshenoy99:master

Conversation

@arunshenoy99
Copy link
Copy Markdown
Member

@arunshenoy99 arunshenoy99 commented Jan 20, 2025

Proposed changes

Story: https://jira.newfold.com/browse/PRESS7-124

In cases of option updates, the option handler was processing a large number of concurrent updates, which overloaded the server with requests because the throttle could not intervene quickly enough. This PR introduces a WP Cron event that is scheduled whenever an option update occurs. The event triggers a single cache purge 60 seconds later, preventing multiple requests from overwhelming the server at once.

epc_purge_scheduled.mp4

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@wpscholar wpscholar merged commit fa32897 into bluehost:master Feb 4, 2025
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.

3 participants