cloudflare / Cloudflare-WordPress

A Cloudflare plugin for WordPress
https://www.cloudflare.com/wordpress/
BSD 3-Clause "New" or "Revised" License
216 stars 83 forks source link

Add WordPress action for executing code after entire cache has been purged with purgeCacheEverything #549

Open janvitos opened 2 months ago

janvitos commented 2 months ago

Confirmation

WordPress version

6.6.2

Cloudflare-WordPress version

4.12.8

PHP version

8.2.23

Expected result

I believe there is currently no way to execute code after the entire cache has been purged with purgeCacheEverything. I am facing a problem where I am trying to prime the Cloudflare cache by executing a script, but some URLs aren't primed because the script is executed too rapidly and it tries to prime the first URLs while they haven't been purged yet. Running the script on a timed delay would still be met with uncertainty, so the best way would be to be able to execute code once we know with certainty that the cache has been purged.

Actual result

No action exist to execute code after the entire cache has been purged with purgeCacheEverything.

Steps to reproduce

No need for steps.

Additional factoids

No response

References

No response