wp_using_ext_object_cache() WordPress Function

The wp_using_ext_object_cache() function allows you to determine whether an external object cache is being used. This can be useful if you need to know whether data is being cached and how long it will be cached for.

wp_using_ext_object_cache( bool $using = null ) #

Toggle $_wp_using_ext_object_cache on and off without directly touching global.


Parameters

$using

(bool)(Optional)Whether external object cache is being used.

Default value: null


Top ↑

Return

(bool) The current 'using' setting.


Top ↑

Source

File: wp-includes/load.php

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;
}


Top ↑

Changelog

Changelog
VersionDescription
3.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.