| 开发者 | butialabs |
|---|---|
| 更新时间 | 2026年9月7日 02:26 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
wp-config.php:
define( 'OH_MY_CACHE_CF_API_TOKEN', 'your-token' );
or set OH_MY_CACHE_CF_API_TOKEN in the environment. The token is then never written to the
database, so it stays out of backups and staging copies, and the settings screen stops offering
a field for it.
If DISABLE_WP_CRON is set
Queued retries need something to run them:
* * * * * wp oh-my-cache queue run --all --quiet
Without a cron entry, anything that falls back to the queue never runs. The dashboard warns you
when that happens.Only if you turn the Redis driver on. It needs phpredis 6.0 or newer and does not bundle a pure-PHP replacement. When phpredis is missing, the driver says so instead of failing quietly.
Up to about a minute. WordPress will not spawn cron more than once every 60 seconds, so a queued job is never instant. Local cache clearing always runs immediately for that reason; only Cloudflare gets deferred.
Whichever your site publishes. Core, Yoast SEO, Rank Math, All in One SEO and SEOPress are
detected, and the index is read twice a day for the file names, so a news sitemap, a taxonomy one
or page two of a paginated one need no configuring. Editing a post clears its post type's files,
its taxonomies, the author file and the news sitemap, and leaves the other types alone.
The dashboard lists what was found. For anything undetected, put its index URL in the paths field
under When to purge, or use the oh_my_cache_sitemap_urls filter.
Yes. WooCommerce writes stock, prices and variations straight to the database without saving the post, so the plugin listens to WooCommerce's own hooks: a price change or the last item selling out clears the product page, the shop page and the category archives. The cart, checkout and account pages never reach the edge, and neither do cart fragments. Twice over: the origin refuses to mark them cacheable, and the Cloudflare rule excludes their paths, taken from your store's settings rather than the English defaults.
Only once clearing demonstrably works, which is why the wizard refuses a non-zero edge TTL until a test purge has actually succeeded. Pages held at the edge while clearing is broken stay stale for the whole TTL, and a visitor cannot get past them.