bp_core_get_incrementor( string $group )

Gets a group-specific cache incrementor.

Description Description

The incrementor is paired with query identifiers (like SQL strings) to create cache keys that can be invalidated en masse.

If an incrementor does not yet exist for the given $group, one will be created.

Top ↑

Parameters Parameters


(string) (Required) Cache group. Eg 'bp_activity'.

Top ↑

Return Return


Source Source

File: bp-core/bp-core-cache.php

function bp_core_get_incrementor( $group ) {
	$incrementor = wp_cache_get( 'incrementor', $group );
	if ( ! $incrementor ) {
		$incrementor = microtime();
		wp_cache_set( 'incrementor', $incrementor, $group );

	return $incrementor;

Top ↑

Changelog Changelog

Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.