Feature request: exact URL-level cache purge API for Speed Optimizer
-
Hi SiteGround team,
I’m the developer of Cache Autopilot, a WordPress cache freshness plugin that works alongside existing cache plugins.
Cache Autopilot determines which frontend URLs are affected by a WordPress change, purges only those pages through the active cache plugin, and then preloads them again in the background.
I had a closer look at Speed Optimizer and saw that you already expose:
sg_cachepress_purge_cache( $url );The only issue for our use case is that the Dynamic Cache implementation also purges descendant paths. For example, purging:
/blog/can also purge:
/blog/page/2/ /blog/child/For Cache Autopilot, we need an integration point that purges only the supplied frontend URL while leaving unrelated descendants cached.
Would you consider exposing an exact-URL mode through the public API?
For comparison, some of the cache plugins we currently support expose integrations like:
// Cache Enabler \Cache_Enabler::clear_page_cache_by_url( $url ); // LiteSpeed Cache do_action( 'litespeed_purge_url', $url ); // FlyingPress \FlyingPress\Purge::purge_urls( [ $url ] );The idea is simply: Cache Autopilot determines the affected URL, and the cache plugin remains fully responsible for invalidating that URL through its own cache logic.
I’m happy to handle the integration and testing on the Cache Autopilot side.
Cache Autopilot:
https://wpcacheautopilot.com/
https://wordpress.org/plugins/cache-autopilot/Best regards,
Beat Schenkel
You must be logged in to reply to this topic.