Cloudflare-WordPress icon indicating copy to clipboard operation
Cloudflare-WordPress copied to clipboard

Plugin slows down saving posts in admin panel

Open ivptr opened this issue 1 year ago • 4 comments

Confirmation

  • [X] My issue isn't already found on the issue tracker.
  • [X] I have replicated my issue using the latest version of the plugin and it is still present.

WordPress version

6.2.2

Cloudflare-WordPress version

4.12.2

PHP version

8.0

Expected result

Do not slow down saving posts.

Actual result

Whenever a post is saved, CloudFlare cache is being cleared.

CF\WordPress\Hooks::purgeCacheOnPostStatusChange function involved takes 2-3 seconds.

Steps to reproduce

  1. Edit any post
  2. Save post

Additional factoids

Proposed solution is to avoid clearing CloudFlare straight away, but schedule it and group all URLs into single API call via cron job.

References

No response

ivptr avatar Aug 07 '23 09:08 ivptr

This is addressed in PR https://github.com/cloudflare/Cloudflare-WordPress/pull/504

ivptr avatar Sep 07 '23 07:09 ivptr

Since Cloudflare API is unavailable today, seeing 504 (Gateway Timeout) error in WordPress Admin Dashboard when saving posts.

If we were using cron job to clear cache instead, work in WordPress would not be affected at all.

ivptr avatar Nov 02 '23 18:11 ivptr

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 01 '24 01:05 github-actions[bot]

@aseure did you get a chance to look at this issue, since CF plugin is really slowing down things in admin dashboard?

johnange avatar May 01 '24 06:05 johnange