bp_core_get_incrementor( string $group )
Gets a group-specific cache incrementor.
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.
Parameters
- $group
-
(Required) Cache group. Eg 'bp_activity'.
Return
(string)
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; }
Changelog
Version | Description |
---|---|
BuddyPress 2.7.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.