Caching Purge with REST API
-
Hello,
I need help with a caching issue while working with the REST API + FlyingPress + Cloudflare setup.
I’m running a high-content WordPress site using the Newspaper theme where we’re publishing 20+ articles per hour via the WordPress REST API using a Python-based publishing tool.
After extensive testing across multiple setups, here’s where things currently stand:✅ What’s Working:
- FlyingPress plugin + Flying CDN (Cloudflare backend) delivers top-tier performance — excellent Core Web Vitals, snappy load times, and impressive image delivery.
- When content is added manually (via WP Dashboard), caching is purged correctly and pages get updated in real time.
- On another site using LiteSpeed Cache + QUIC.cloud, cache purging works flawlessly even via REST API — but the performance (especially image optimization and TTFB) is not on par with FlyingPress.
❌ The Problem:
- When adding posts via REST API, FlyingPress does not purge the cache.
- This means visitors still see stale content even though the REST API has added the new posts.
- FlyingPress support has been unhelpful — they confirm the plugin doesn’t automatically handle REST-based post creation properly for cache purging.
- I’ve tested several workaround plugins (like Purge Cache on REST Publish, custom WP hooks, etc.) — none worked reliably or at the scale I need.
🔧 What I’ve Tried:
- Hooking into rest_after_insert_post, save_post, and wp_insert_post manually via custom plugins/functions.
- Disabling async caching in FlyingPress.
- Manually hitting purge endpoints via REST — not scalable.
- WP Cron-based solutions — not fast or reliable enough.
💡 What I Need Help With:
- Is there a reliable way to trigger FlyingPress cache purge automatically when posts are published via REST API?
- Is there any hook or trigger that works with FlyingPress specifically and supports high-frequency REST publishing?
- **If not FlyingPress, is there any caching + CDN combo that:
- Matches FlyingPress’s speed (especially image delivery)?
- Purges cache accurately when posts are created via REST API?
- Is production-grade for large-scale publishing sites?**
This is a mission-critical issue, and I don’t want to move away from FlyingPress if I can help it. The performance is simply unmatched — but stale content is a major blocker.
Really appreciate any thoughts, custom code tips, or plugin suggestions. 🙏
The topic ‘Caching Purge with REST API’ is closed to new replies.