bp_get_non_cached_ids( array $item_ids, string $cache_group )

Determine which items from a list do not have cached values.

Parameters Parameters


(array) (Required) ID list.


(string) (Required) The cache group to check against.

Top ↑

Return Return


Source Source

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

function bp_get_non_cached_ids( $item_ids, $cache_group ) {
	$uncached = array();

	foreach ( $item_ids as $item_id ) {
		$item_id = (int) $item_id;
		if ( false === wp_cache_get( $item_id, $cache_group ) ) {
			$uncached[] = $item_id;

	return $uncached;

Top ↑

Changelog Changelog

Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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