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.
Parameters Parameters
- $group
-
(Required) Cache group. Eg 'bp_activity'.
Return Return
(string)
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; }
Changelog Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |