site_status_should_suggest_persistent_object_cache
Filters whether to suggest use of a persistent object cache and bypass default threshold checks.
Using this filter allows to override the default logic, effectively short-circuiting the method.
Usage
add_filter( 'site_status_should_suggest_persistent_object_cache', 'wp_kama_site_status_should_suggest_persistent_object_cache_filter' );
/**
* Function for `site_status_should_suggest_persistent_object_cache` filter-hook.
*
* @param bool|null $suggest Boolean to short-circuit, for whether to suggest using a persistent object cache.
*
* @return bool|null
*/
function wp_kama_site_status_should_suggest_persistent_object_cache_filter( $suggest ){
// filter...
return $suggest;
}
- $suggest(true|false|null)
- Boolean to short-circuit, for whether to suggest using a persistent object cache.
Default: null
Changelog
| Since 6.1.0 | Introduced. |
Where the hook is called
site_status_should_suggest_persistent_object_cache
wp-admin/includes/class-wp-site-health.php 3526
$short_circuit = apply_filters( 'site_status_should_suggest_persistent_object_cache', null );