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 +56 -4 1.3.6 → 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 */
@@ -103,8 +103,13 @@
103 103 // purge that runs after an import, which the nginx adapter's import
104 104 // gate stands down in favour of.
105 105 Server_Caches::boot();
106 106
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();
111 +
107 112 // Register Free modules via the same action xspeed-pro uses, so
108 113 // the bootstrap path is symmetric across tiers.
109 114 add_action( 'xspeed_register_modules', array( $this, 'register_free_modules' ) );
110 115
@@ -129,8 +134,38 @@
129 134 }
130 135 }
131 136
132 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 + /**
133 168 * Run version-gated data migrations exactly once per upgrade.
134 169 *
135 170 * Keyed on `xspeed_data_version` rather than the plugin version header
136 171 * so a migration can be added without forcing a release bump.
@@ -140,17 +175,25 @@
140 175 if ( version_compare( $current, self::DATA_VERSION, '>=' ) ) {
141 176 return;
142 177 }
143 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 +
144 183 // 1.1.2 — strip credential values recorded by earlier versions'
145 184 // settings change annotations (they're served by the trend endpoints).
146 - Activity_Log::redact_legacy_secrets();
185 + if ( version_compare( $current, '1.1.2', '<' ) ) {
186 + Activity_Log::redact_legacy_secrets();
187 + }
147 188
148 189 // 1.1.4 — earlier versions cached a failed loopback as "gzip is not
149 190 // active" for an hour, which showed up as a bogus server-config
150 191 // warning. Drop the stale answer so the fixed probe re-runs instead
151 192 // of the wrong verdict living on past the update (issue #18).
152 - delete_transient( 'xspeed_gzip_active' );
193 + if ( version_compare( $current, '1.1.4', '<' ) ) {
194 + delete_transient( 'xspeed_gzip_active' );
195 + }
153 196
154 197 // 1.1.6 — a `/?s=<term>` request used to write its results page into
155 198 // the static tree under the *searched-from* path, which for the usual
156 199 // query-form search is `/`. The web server then served that results
@@ -158,9 +201,18 @@
158 201 // Cache::store_static(), but an entry poisoned before the update
159 202 // outlives it: nothing purges on upgrade, and the static serve path
160 203 // never revalidates. Clear the tree once. The flat cache is keyed
161 204 // correctly and is deliberately left alone. (issue #191)
162 - 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 + }
163 215
164 216 update_option( 'xspeed_data_version', self::DATA_VERSION, false );
165 217 }
166 218