Repository navigation
GT Performance 1.3.6
Sites on xCloud's Cloudflare Enterprise add-on are purged where visitors are served.
- An Enterprise domain is a DNS-only CNAME to
edge.xcloud.app, served from xCloud's own Cloudflare zone. GT Performance purged the origin, and the direct Cloudflare integration purged the site owner's zone. Cloudflare accepted those purges, by URL, by prefix, andpurge_everything, but they cleared nothing a visitor received. On gauravtiwari.org, Page Blocks edits and the Purge button left pages stale at the edge untils-maxage(3600 s) ran out. xCloud's ownxcloud-cfe-cache-purge.phpmu-plugin purges only a saved post's own URLs. XCloud\EnterprisePurgeHookdetects that mu-plugin. It needs the file inWPMU_PLUGIN_DIRand theXCLOUD_CFE_PURGE_*token pair it defines. It posts to the plugin's endpoint in the plugin's own shape (auth_token,verify_token,source,version, thenurlsorpurge_all). The endpoint must be HTTPS on anxcloud.hosthostname, or the tokens are never sent. URLs go in batches of 50, matching the plugin.- A post edit no longer empties the whole Enterprise cache. xCloud drops a merged purge of more than 300 URLs. Every post save on gauravtiwari.org named 502 to 512 URLs: 2 to 12 related URLs plus 500 recorded dependents, capped at 500, because the
broad:*dependency is recorded on 759 pages.Purger::purgeUrls()takes an optional$primarysubset, andgt_performance_purged_urlspasses the primary URLs and their variants as a third argument.PageCacheModulemarks the related set as primary for saves, unpublishing, trashing, and comments. Over 300 URLs,EnterprisePurgeModulesends only the primary URLs, so recorded dependents are purged at the origin and refresh at the edge on expiry. The receipt counts them inorigin_only. A purge without a primary set treats every URL as primary. A primary set still over 300 becomes one whole-site purge. - A post change no longer purges page two and later of the listings it appears in. Every listing's later pages shift when a post joins or leaves, but page one carries the post and is where visitors land. On gauravtiwari.org the later pages were 111 of the 500 recorded dependents each save purged.
PostPublishPurgePolicy::firstPagesOnly()drops/<pagination base>/N/paths andpaged=Nqueries from the dependents of saves, unpublishing, trashing, and comments. The later pages refresh when their copies expire (fresh_ttl, one hour by default). The permalink, home, and archive page one are unchanged. Return true fromgt_performance_purge_paginated_listingsto purge every page again. - A page with a long listing no longer depends on every change on the site. A page that recorded more than
DependencyIndex::MAX_PER_PAGE(300) signatures was stored asbroad:*, and every change of any kind purged it. On gauravtiwari.org that covered 757 of 4,338 indexed pages. Docs and roadmap pages crossed the limit through the core-support docs sidebar (427 listed docs), and archive pages through the MD accordion widget (255 listed posts plus about 75 term signatures). The 500 dependents of every post save were 500 of those pages, the same set each time.DependencyRecorder::bounded()now replaces a page's listed posts with oneptv:<type>per post type when it is over the limit. A docs page depends onptv:csp_doc, so a blog post save leaves it alone, while an edit to any doc still purges it. The page's own post, embedded reusable blocks and menus, and the set signatures (pt:,term:) are kept. A page still over the limit falls back tobroad:*, as does one that ran more than 200 queries. - Search results reached through the permalink form (
/search/<terms>/) are no longer cached whilesis on the never-cache list, which is the default.?s=was refused before WordPress loaded, but the permalink form has no query string and was stored. gauravtiwari.org held 128 such pages, mostly bots replaying old/search/label/<x>links, each recordingbroad:*.PageCacheModule::capture()refuses them with reasonquery:swhenis_search(). A site that removessfrom the list caches both forms. XCloud\EnterprisePurgeModulequeuesgt_performance_purged_urlsandgt_performance_purged_alland sends once per request. Automatic purges go onshutdownwithout blocking, as xCloud's plugin does. Callers that report a result flush throughgt_performance_flush_edge_purgesand wait for xCloud's reply: the Purge button,cache purge, purge-and-verify, and abilities. The receipt is stored ingt_performance_xcloud_enterprise_last_purge, andEdgeReportreads it as providerxcloud-enterprise.EdgeOwnership::xcloudOwnsEdge()is true while the hook is available, with no xCloud API token.CloudflareModuletherefore stops calling Cloudflare, and the Disconnector leaves the zone alone. Rule sync is refused in admin and WP-CLI with an explanation. Direct Cloudflare keeps its settings and resumes when the mu-plugin is removed. With the hook installed,hasDirectCloudflareConflict()no longer reports a conflict;directCloudflarePaused()reports the paused state, and the Cloudflare tab and connection check say so.SiteService::purgeAutomatic()no longer fails closed for Enterprise once the hook is available, so a connected xCloud site still clears its host page cache.- The Integrations panel appears when the mu-plugin is installed, even without an xCloud API token. It shows the Enterprise purge state and the last Enterprise purge.
wp gt-performance xcloud statusaddsenterprise_purge=xcloud-plugin|unusable|not-installed.wp gt-performance xcloud purgeclears Enterprise first, the whole site or one page with--page-url.doctorreports direct Cloudflare as paused. Theget-statusability reportscloudflareas false while it is paused and addsxcloud_enterprise_purge. - Return false from the
gt_performance_xcloud_enterprise_purgefilter to keep GT Performance out of Enterprise purging while the mu-plugin is installed.