WP_Object_Cache::add_global_groups
Sets the list of global cache groups.
Method of the class: WP_Object_Cache{}
No Hooks.
Returns
null. Nothing (null).
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. |
WP_Object_Cache::add_global_groups() WP Object Cache::add global groups code WP 7.0
public function add_global_groups( $groups ) {
$groups = (array) $groups;
$groups = array_fill_keys( $groups, true );
$this->global_groups = array_merge( $this->global_groups, $groups );
}