Skip to content

GT Performance 1.3.6

Choose a tag to compare

@github-actions github-actions released this 26 Oct 02:38
· 5 commits to main since this release

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, and purge_everything, but they cleared nothing a visitor received. On gauravtiwari.org, Page Blocks edits and the Purge button left pages stale at the edge until s-maxage (3600 s) ran out. xCloud's own xcloud-cfe-cache-purge.php mu-plugin purges only a saved post's own URLs.
  • XCloud\EnterprisePurgeHook detects that mu-plugin. It needs the file in WPMU_PLUGIN_DIR and the XCLOUD_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, then urls or purge_all). The endpoint must be HTTPS on an xcloud.host hostname, 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 $primary subset, and gt_performance_purged_urls passes the primary URLs and their variants as a third argument. PageCacheModule marks the related set as primary for saves, unpublishing, trashing, and comments. Over 300 URLs, EnterprisePurgeModule sends only the primary URLs, so recorded dependents are purged at the origin and refresh at the edge on expiry. The receipt counts them in origin_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 and paged=N queries 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 from gt_performance_purge_paginated_listings to 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 as broad:*, 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 one ptv:<type> per post type when it is over the limit. A docs page depends on ptv: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 to broad:*, as does one that ran more than 200 queries.
  • Search results reached through the permalink form (/search/<terms>/) are no longer cached while s is 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 recording broad:*. PageCacheModule::capture() refuses them with reason query:s when is_search(). A site that removes s from the list caches both forms.
  • XCloud\EnterprisePurgeModule queues gt_performance_purged_urls and gt_performance_purged_all and sends once per request. Automatic purges go on shutdown without blocking, as xCloud's plugin does. Callers that report a result flush through gt_performance_flush_edge_purges and wait for xCloud's reply: the Purge button, cache purge, purge-and-verify, and abilities. The receipt is stored in gt_performance_xcloud_enterprise_last_purge, and EdgeReport reads it as provider xcloud-enterprise.
  • EdgeOwnership::xcloudOwnsEdge() is true while the hook is available, with no xCloud API token. CloudflareModule therefore 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 status adds enterprise_purge=xcloud-plugin|unusable|not-installed. wp gt-performance xcloud purge clears Enterprise first, the whole site or one page with --page-url. doctor reports direct Cloudflare as paused. The get-status ability reports cloudflare as false while it is paused and adds xcloud_enterprise_purge.
  • Return false from the gt_performance_xcloud_enterprise_purge filter to keep GT Performance out of Enterprise purging while the mu-plugin is installed.