wp_using_ext_object_cache

函数
wp_using_ext_object_cache ( $using = null )
参数
  • (bool) $using Whether external object cache is being used.
    Required:
    Default: null
返回值
  • (bool) The current 'using' setting.
定义位置
相关方法
wp_start_object_cacheget_object_term_cachewp_set_object_termswp_get_object_termsupdate_object_term_cache
引入
3.7.0
弃用
-

切换`$_wp_using_ext_object_cache`的开与关,而不直接接触全局。

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