Skip to content

Commit 1eec5d3

Browse files
committed
add some inline commenting
1 parent e732e89 commit 1eec5d3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

inc/site-health.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,11 @@ function test_object_cache() {
965965
return $result;
966966
}
967967

968+
// Redis is available and active. Check which object cache plugin is active.
968969
$wp_redis_active = is_plugin_active( 'wp-redis/wp-redis.php' );
969970
$ocp_active = is_plugin_active( 'object-cache-pro/object-cache-pro.php' );
970971

972+
// If WP Redis is active, we recommend using Object Cache Pro.
971973
if ( $wp_redis_active ) {
972974
$result = [
973975
'label' => __( 'WP Redis Active', 'pantheon' ),
@@ -988,6 +990,7 @@ function test_object_cache() {
988990
return $result;
989991
}
990992

993+
// If Object Cache Pro is active, we can return a good status.
991994
if ( $ocp_active ) {
992995
$result = [
993996
'label' => __( 'Object Cache Pro Active', 'pantheon' ),
@@ -1008,6 +1011,7 @@ function test_object_cache() {
10081011
return $result;
10091012
}
10101013

1014+
// Redis is active but no object cache plugin is installed. Recommend OCP.
10111015
$result = [
10121016
'label' => __( 'No Object Cache Plugin Active', 'pantheon' ),
10131017
'status' => 'critical',

0 commit comments

Comments
 (0)