WP_Super_Cache_Rest_Update_Settings::set_global()protectedWPSCache 1.0

A generic method for setting globals.

The setting must be added to the whitelist in order to be set this way.

{} It's a method of the class: WP_Super_Cache_Rest_Update_Settings{}

No Hooks.


null. Nothing.


// protected - for code of main (parent) or child class
$result = $this->set_global( $global_name, $value );
$global_name(string) (required)
$value(mixed) (required)

Code of WP_Super_Cache_Rest_Update_Settings::set_global() WPSCache 1.8

protected function set_global( $global_name, $value ) {
	$whitelist = array(

	if ( ! in_array( $global_name, $whitelist ) ) {
		return false;

	wp_cache_setting( $global_name, (int)$value );