You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2407,110 +2471,123 @@ public function get_test_authorization_header() {
2407
2471
* @return array The test result.
2408
2472
*/
2409
2473
publicfunctionget_test_page_cache() {
2410
-
$description = '<p>' . __( 'Page cache enhances the speed and performance of your site by saving and serving static pages instead of calling for a page every time a user visits.' ) . '</p>';
2411
-
$description .= '<p>' . __( 'Page cache is detected by looking for an active page cache plugin as well as making three requests to the homepage and looking for one or more of the following HTTP client caching response headers:' ) . '</p>';
__( 'Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: %1$s (Code: %2$s)' ),
$result['label'] = __( 'Page cache is not detected but the server response time is OK' );
2452
-
break;
2453
-
case'good':
2454
-
$result['label'] = __( 'Page cache is detected and the server response time is good' );
2455
-
break;
2456
-
default:
2457
-
if ( empty( $page_cache_detail['headers'] ) && ! $page_cache_detail['advanced_cache_present'] ) {
2458
-
$result['label'] = __( 'Page cache is not detected and the server response time is slow' );
2459
-
} else {
2460
-
$result['label'] = __( 'Page cache is detected but the server response time is still slow' );
2461
-
}
2462
-
}
2463
-
2464
-
$page_cache_test_summary = array();
2465
-
2466
-
if ( empty( $page_cache_detail['response_time'] ) ) {
2467
-
$page_cache_test_summary[] = '<span class="dashicons dashicons-dismiss" aria-hidden="true"></span> ' . __( 'Server response time could not be determined. Verify that loopback requests are working.' );
$description = '<p>' . __( 'Page cache enhances the speed and performance of your site by saving and serving static pages instead of calling for a page every time a user visits.' ) . '</p>';
2476
+
$description .= '<p>' . __( 'Page cache is detected by looking for an active page cache plugin as well as making three requests to the homepage and looking for one or more of the following HTTP client caching response headers:' ) . '</p>';
$result['label'] = __( 'Unable to detect the presence of page cache' );
2501
+
$result['status'] = 'recommended';
2502
+
$error_info = sprintf(
2503
+
__( 'Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: %1$s (Code: %2$s)' ),
$result['label'] = __( 'Page cache is not detected but the server response time is OK' );
2536
+
break;
2537
+
2538
+
case'good':
2539
+
$result['label'] = __( 'Page cache is detected and the server response time is good' );
2540
+
break;
2541
+
2542
+
default:
2543
+
if ( empty( $page_cache_detail['headers'] ) && ! $page_cache_detail['advanced_cache_present'] ) {
2544
+
$result['label'] = __( 'Page cache is not detected and the server response time is slow' );
2545
+
} else {
2546
+
$result['label'] = __( 'Page cache is detected but the server response time is still slow' );
2547
+
}
2548
+
}
2549
+
2550
+
$page_cache_test_summary = array();
2551
+
2552
+
// Response time
2553
+
if ( empty( $page_cache_detail['response_time'] ) ) {
2554
+
$page_cache_test_summary[] = '<span class="dashicons dashicons-dismiss"></span> ' . __( 'Server response time could not be determined. Verify that loopback requests are working.' );
0 commit comments