bp_get_non_cached_ids( array $item_ids, string $cache_group )

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

Description

Parameters

$item_ids

(Required) ID list.

$cache_group

(Required) The cache group to check against.

Return

(array)

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;
}

Changelog

Changelog
Version Description
BuddyPress 2.0.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.