{"id":19008723,"date":"2026-09-01T15:22:53","date_gmt":"2026-09-01T15:22:53","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/feature-request-exact-url-level-cache-purge-api-for-speed-optimizer\/"},"modified":"2026-09-01T15:22:53","modified_gmt":"2026-09-01T15:22:53","slug":"feature-request-exact-url-level-cache-purge-api-for-speed-optimizer","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/feature-request-exact-url-level-cache-purge-api-for-speed-optimizer\/","title":{"rendered":"Feature request: exact URL-level cache purge API for Speed Optimizer"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi SiteGround team,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I\u2019m the developer of Cache Autopilot, a WordPress cache freshness plugin that works alongside existing cache plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I had a closer look at Speed Optimizer and saw that you already expose:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sg_cachepress_purge_cache( $url );\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The only issue for our use case is that the Dynamic Cache implementation also purges descendant paths. For example, purging:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/blog\/\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">can also purge:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/blog\/page\/2\/\n\/blog\/child\/\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For Cache Autopilot, we need an integration point that purges only the supplied frontend URL while leaving unrelated descendants cached.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Would you consider exposing an exact-URL mode through the public API?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For comparison, some of the cache plugins we currently support expose integrations like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Cache Enabler\n\\Cache_Enabler::clear_page_cache_by_url( $url );\n\n\/\/ LiteSpeed Cache\ndo_action( 'litespeed_purge_url', $url );\n\n\/\/ FlyingPress\n\\FlyingPress\\Purge::purge_urls( &#091; $url ] );\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I\u2019m happy to handle the integration and testing on the Cache Autopilot side.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cache Autopilot:<br \/><a href=\"https:\/\/wpcacheautopilot.com\/\">https:\/\/wpcacheautopilot.com\/<\/a><br \/><a href=\"https:\/\/wordpress.org\/plugins\/cache-autopilot\/\">https:\/\/wordpress.org\/plugins\/cache-autopilot\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Best regards,<br \/>Beat Schenkel<\/p>\n","protected":false},"template":"","class_list":["post-19008723","topic","type-topic","status-publish","hentry","topic-tag-cache","topic-tag-purge","topic-tag-url"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19008723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19008723\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19008723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}