WP_Object_Cache::add_global_groups() WordPress Method

The WP_Object_Cache::add_global_groups() method allows you to add a group or array of groups to the list of global groups. Global groups are groups of objects that are cached in memory and are available to all requests.

WP_Object_Cache::add_global_groups( string|string[] $groups ) #

Sets the list of global cache groups.


Parameters

$groups

(string|string[])(Required)List of groups that are global.


Top ↑

Source

File: wp-includes/class-wp-object-cache.php

	public function add_global_groups( $groups ) {
		$groups = (array) $groups;

		$groups              = array_fill_keys( $groups, true );
		$this->global_groups = array_merge( $this->global_groups, $groups );
	}


Top ↑

Changelog

Changelog
VersionDescription
3.0.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.