WordPress at a glance
function is not described

WP_Object_Cache::add_global_groups() public WP 3.0.0

Sets the list of global cache groups.

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

No Hooks.

Return

null. Nothing.

Usage

$WP_Object_Cache = new WP_Object_Cache();
$WP_Object_Cache->add_global_groups( $groups );
$groups(string|string[]) (required)
List of groups that are global.

Changelog

Since 3.0.0 Introduced.

Code of WP_Object_Cache::add_global_groups() WP 5.7.2

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