PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.3.7
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.3.7
1.3.7 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.2.4 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 All 33 releases
← All changes | includes/class-plugin.php +64 -11 1.3.5 → 1.3.7 View file →
@@ -14,9 +14,9 @@
14 14 /**
15 15 * Data-schema version for one-time migrations, independent of the
16 16 * plugin version header. Bump when adding a step to maybe_upgrade().
17 17 */
18 - public const DATA_VERSION = '1.1.6';
18 + public const DATA_VERSION = '1.3.6';
19 19
20 20 private static $instance = null;
21 21
22 22 /** @var Usage_Tracker|null */
@@ -93,16 +93,22 @@
93 93 // Integrations that clear OTHER plugins' caches of rendered output
94 94 // (Elementor's element cache + generated CSS). Registers a listener
95 95 // only; nothing runs until Cache::purge_render_caches() asks.
96 96 Render_Caches::boot();
97 - // Server_Caches needs no boot(): Cache::dispatch_purge_event() calls it
98 - // directly so a throwing third-party listener cannot skip it.
97 + // Forwarding needs no boot(): Cache::dispatch_purge_event() calls
98 + // Server_Caches::forward() directly so a throwing third-party listener
99 + // cannot skip it. Both built-in server-cache adapters live behind it —
100 + // LiteSpeed, and the nginx FastCGI cache reached through the host's
101 + // Nginx Helper install (Host_Page_Caches), which is why neither is
102 + // booted here. This boot() registers one listener only: the single
103 + // purge that runs after an import, which the nginx adapter's import
104 + // gate stands down in favour of.
105 + Server_Caches::boot();
99 106
100 - // Forward a full purge to a full-page cache owned by the WEB SERVER
101 - // (nginx FastCGI, via the host's Nginx Helper install). Registers a
102 - // listener on xspeed_after_purge_all only; it stands down unless
103 - // that cache is actually configured.
104 - Host_Page_Caches::boot();
107 + // Tell WP Statistics and Slimstat not to count the warmer, the
108 + // benchmark and the verifier as visitors. Record-time filters only;
109 + // see the class for why the tracking snippet itself is left alone.
110 + Self_Traffic::boot();
105 111
106 112 // Register Free modules via the same action xspeed-pro uses, so
107 113 // the bootstrap path is symmetric across tiers.
108 114 add_action( 'xspeed_register_modules', array( $this, 'register_free_modules' ) );
@@ -128,8 +134,38 @@
128 134 }
129 135 }
130 136
131 137 /**
138 + * Add the 1.3.6 tracking params to a saved ignored-params list.
139 + *
140 + * Only those names, and only when missing: anything else the site
141 + * removed stays removed. A site with no saved list already reads the new
142 + * defaults.
143 + */
144 + public static function add_new_ignored_params(): void {
145 + $option = Settings_Manager::OPTION_PREFIX . 'cache';
146 + $stored = get_option( $option, array() );
147 + if ( ! is_array( $stored ) || ! is_array( $stored['ignored_query_params'] ?? null ) ) {
148 + return;
149 + }
150 + $list = $stored['ignored_query_params'];
151 + // An empty list is a choice: every query string bypasses the cache.
152 + if ( empty( $list ) ) {
153 + return;
154 + }
155 + $missing = array_values( array_diff( \XSpeed\Modules\Cache\CacheModule::TRACKING_PARAMS_1_3_6, $list ) );
156 + if ( empty( $missing ) ) {
157 + return;
158 + }
159 + $stored['ignored_query_params'] = array_merge( $list, $missing );
160 + update_option( $option, $stored );
161 + // The drop-in keeps its own copy of the list next to the cache.
162 + if ( defined( 'XSPEED_CACHE_DIR' ) ) {
163 + Cache::sync_query_allowlist();
164 + }
165 + }
166 +
167 + /**
132 168 * Run version-gated data migrations exactly once per upgrade.
133 169 *
134 170 * Keyed on `xspeed_data_version` rather than the plugin version header
135 171 * so a migration can be added without forcing a release bump.
@@ -139,17 +175,25 @@
139 175 if ( version_compare( $current, self::DATA_VERSION, '>=' ) ) {
140 176 return;
141 177 }
142 178
179 + // Each step runs once, for the version that needs it. They used to
180 + // run on every bump, which would purge every site's static tree again
181 + // for a migration that has nothing to do with it.
182 +
143 183 // 1.1.2 — strip credential values recorded by earlier versions'
144 184 // settings change annotations (they're served by the trend endpoints).
145 - Activity_Log::redact_legacy_secrets();
185 + if ( version_compare( $current, '1.1.2', '<' ) ) {
186 + Activity_Log::redact_legacy_secrets();
187 + }
146 188
147 189 // 1.1.4 — earlier versions cached a failed loopback as "gzip is not
148 190 // active" for an hour, which showed up as a bogus server-config
149 191 // warning. Drop the stale answer so the fixed probe re-runs instead
150 192 // of the wrong verdict living on past the update (issue #18).
151 - delete_transient( 'xspeed_gzip_active' );
193 + if ( version_compare( $current, '1.1.4', '<' ) ) {
194 + delete_transient( 'xspeed_gzip_active' );
195 + }
152 196
153 197 // 1.1.6 — a `/?s=<term>` request used to write its results page into
154 198 // the static tree under the *searched-from* path, which for the usual
155 199 // query-form search is `/`. The web server then served that results
@@ -157,9 +201,18 @@
157 201 // Cache::store_static(), but an entry poisoned before the update
158 202 // outlives it: nothing purges on upgrade, and the static serve path
159 203 // never revalidates. Clear the tree once. The flat cache is keyed
160 204 // correctly and is deliberately left alone. (issue #191)
161 - Cache::purge_static_tree();
205 + if ( version_compare( $current, '1.1.6', '<' ) ) {
206 + Cache::purge_static_tree();
207 + }
208 +
209 + // 1.3.6 — new click and campaign IDs in the default ignored list.
210 + // A site that ever saved the Cache panel has its own copy of the list,
211 + // which the new defaults never reach, so add them to it.
212 + if ( version_compare( $current, '1.3.6', '<' ) ) {
213 + self::add_new_ignored_params();
214 + }
162 215
163 216 update_option( 'xspeed_data_version', self::DATA_VERSION, false );
164 217 }
165 218