PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.4.0
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.4.0
1.4.1 1.4.0 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 All 35 releases
← All changes | includes/modules/Health/HealthModule.php +23 -3 1.3.5 → 1.4.0 View file →
@@ -53,10 +53,20 @@
53 53 // Out-of-band refresh of the Set-Cookie probe. Health::checks()
54 54 // only ever reads the cached verdict, so the HTTP round-trip
55 55 // happens here instead of inside a request the user waits on.
56 56 add_action( \XSpeed\Cookie_Inspector::CRON_HOOK, array( $this, 'refresh_cookie_probe' ) );
57 +
58 + // Same pattern for the edge-mode probe: the page it requests is
59 + // answered here, and the two round-trips run from cron.
60 + \XSpeed\Edge_Mode_Probe::boot();
61 + add_action( \XSpeed\Edge_Mode_Probe::CRON_HOOK, array( $this, 'refresh_edge_mode_probe' ) );
57 62 }
58 63
64 + /** Cron callback: ask the edge whether it obeys "do not store". */
65 + public function refresh_edge_mode_probe(): void {
66 + \XSpeed\Edge_Mode_Probe::run();
67 + }
68 +
59 69 /** Cron callback: perform the real (blocking) probe off-request. */
60 70 public function refresh_cookie_probe(): void {
61 71 \XSpeed\Cookie_Inspector::probe( true );
62 72 }
@@ -147,9 +157,16 @@
147 157 // "toggle Enable Cache off and on" cannot reinstall anything —
148 158 // the same condition suppresses the write and auto_heal() strips
149 159 // the block again on the next admin load. Explain the real cause.
150 160 $block_reason = \XSpeed\Cache::static_rewrite_block_reason();
151 - if ( 'no_mod_headers' === $block_reason ) {
161 + if ( 'litespeed_dropin' === $block_reason ) {
162 + // The intended LiteSpeed default (#509) — 'good', not a nag:
163 + // hits are visible and counted, and the faster path is a
164 + // deliberate opt-in, not a missing config.
165 + $result['label'] = __( 'xSpeed is serving cache hits through PHP (LiteSpeed)', 'xspeed' );
166 + $result['status'] = 'good';
167 + $result['description'] = '<p>' . esc_html__( 'Caching is working — hits are served by the xSpeed drop-in and tagged X-XSpeed-Cache: HIT (php), so every hit is visible and counted. LiteSpeed\'s .htaccess engine cannot tag or log statically served files, so this is the default. To serve hits straight from the web server with no PHP (at the cost of that tagging and counting), turn on LiteSpeed Static Fast Path in xSpeed\'s Cache settings.', 'xspeed' ) . '</p>';
168 + } elseif ( 'no_mod_headers' === $block_reason ) {
152 169 $result['label'] = __( 'xSpeed is serving cache hits through PHP', 'xspeed' );
153 170 $result['status'] = 'recommended';
154 171 $result['description'] = '<p>' . esc_html__( 'Caching is working — hits are served by the xSpeed drop-in and tagged X-XSpeed-Cache: HIT (php). The faster .htaccess fast path is off because Apache\'s mod_headers module is not loaded, without which a static hit could not be tagged or counted. Enable mod_headers (a2enmod headers on Debian/Ubuntu, then restart Apache) to shave roughly 20-30ms off each cache hit.', 'xspeed' ) . '</p>';
155 172 } elseif ( 'mobile_separate' === $block_reason ) {
@@ -155,9 +172,11 @@
155 172 } elseif ( 'mobile_separate' === $block_reason ) {
156 173 $result['label'] = __( 'xSpeed static rewrite is off (Separate Mobile Cache)', 'xspeed' );
157 174 $result['status'] = 'recommended';
158 175 $result['description'] = '<p>' . esc_html__( 'Separate Mobile Cache is on, so cache hits are served by the PHP drop-in to keep per-device HTML correct. Turn Separate Mobile Cache off if your site serves the same HTML to every device to regain the faster static path.', 'xspeed' ) . '</p>';
159 - } elseif ( \XSpeed\Server::APACHE === $server_type && ! \XSpeed\Cache::rewrite_installed() ) {
176 + } elseif ( '' === $block_reason && ! \XSpeed\Cache::rewrite_installed() ) {
177 + // Apache, or LiteSpeed with the Static Fast Path opt-in on
178 + // (#509) — either way the block SHOULD be there and is not.
160 179 $result['label'] = __( 'xSpeed .htaccess rewrite block is missing', 'xspeed' );
161 180 $result['status'] = 'recommended';
162 181 $result['description'] = '<p>' . esc_html__( 'Without the static-rewrite block, cache hits go through the PHP drop-in (~85ms TTFB) instead of the web server (~5-15ms). Toggle Enable Cache off and on in xSpeed to reinstall the block.', 'xspeed' ) . '</p>';
163 182 }
@@ -240,9 +259,9 @@
240 259 public function ui_metadata(): array {
241 260 return array(
242 261 'label' => __( 'Health', 'xspeed' ),
243 262 'icon' => 'HeartPulse',
244 - 'description' => __( 'Diagnostics, hit ratio, and recent cache activity.', 'xspeed' ),
263 + 'description' => __( 'Checks for problems and shows how often visitors get cached pages.', 'xspeed' ),
245 264 // Health is the single host page for all Insights (FBS-83633):
246 265 // a Recommendations action card + Cache / Visitors / PageSpeed
247 266 // tabs. HealthPanel renders the Free cache diagnostics (the old
248 267 // HealthCard) as the Cache tab and hosts the Pro insight panels
@@ -247,8 +266,9 @@
247 266 // tabs. HealthPanel renders the Free cache diagnostics (the old
248 267 // HealthCard) as the Cache tab and hosts the Pro insight panels
249 268 // as the other tabs via ProSlot.
250 269 'custom_panel' => 'HealthPanel',
270 + 'group' => 'insights',
251 271 );
252 272 }
253 273
254 274 // No settings — explicit empty so Module::rest_routes() doesn't