wp_using_ext_object_cache

Toggle `$_wp_using_ext_object_cache` on and off without directly touching global.

Description

wp_using_ext_object_cache( (null) $using = null ); 

Parameters (1)

0. $using — Optional. (null) => null
Whether external object cache is being used.

Usage

  1. if ( !function_exists( 'wp_using_ext_object_cache' ) ) { 
  2. require_once ABSPATH . WPINC . '/load.php'; 
  3.  
  4. // Whether external object cache is being used. 
  5. $using = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_using_ext_object_cache($using); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/load.php  
  1. function wp_using_ext_object_cache( $using = null ) { 
  2. global $_wp_using_ext_object_cache; 
  3. $current_using = $_wp_using_ext_object_cache; 
  4. if ( null !== $using ) 
  5. $_wp_using_ext_object_cache = $using; 
  6. return $current_using;