apply_filters( 'site_status_should_suggest_persistent_object_cache', bool|null $suggest )
- Since
- 6.1.0
Filters whether to suggest use of a persistent object cache and bypass default threshold checks.
Description
Using this filter allows to override the default logic, effectively short-circuiting the method.
Compatibility
- WordPress
- since 6.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$suggestbool|null- Boolean to short-circuit, for whether to suggest using a persistent object cache.
Default null.
Where this hook fires · 1
wp-admin/includes/class-wp-site-health.php:3769WP_Site_Health::should_suggest_persistent_object_cache()
Source code
* * @since 6.1.0 * * @param bool|null $suggest Boolean to short-circuit, for whether to suggest using a persistent object cache. * Default null. */ $short_circuit = apply_filters( 'site_status_should_suggest_persistent_object_cache', null ); if ( is_bool( $short_circuit ) ) { return $short_circuit; } if ( is_multisite() ) { return true;Changelog
Introduced in 6.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.