bp_core_get_incremented_cache_key( string $key, string $group )

Gets the key to be used when caching a value using an incremented cache key.


Description Description

The $key is hashed with a component-specific incrementor, which is used to invalidate multiple caches at once.


Top ↑

Parameters Parameters

$key

(string) (Required) Unique key for the query. Usually a SQL string.

$group

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


Top ↑

Return Return

(string)


Source Source

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

function bp_core_get_incremented_cache_key( $key, $group ) {
	$incrementor = bp_core_get_incrementor( $group );
	$cache_key = md5( $key . $incrementor );
	return $cache_key;
}


Top ↑

Changelog 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.