Toggles $_wp_using_ext_object_cache on and off without directly touching global.
Parameters
$usingbooloptional- Whether external object cache is being used.
Default:
null
Source
function wp_using_ext_object_cache( $using = null ) {
global $_wp_using_ext_object_cache;
$current_using = $_wp_using_ext_object_cache;
if ( null !== $using ) {
$_wp_using_ext_object_cache = $using;
}
return $current_using;
}
Changelog
| Version | Description |
|---|---|
| 3.7.0 | Introduced. |
Global `global $_wp_using_ext_object_cache;` can return null, so the return type is actually `bool` and `null`.