_get_non_cached_ids( int[] $object_ids, string $cache_key )

Retrieves IDs that are not already present in the cache.


Parameters

$object_ids

(Required) Array of IDs.

$cache_key

(Required) The cache bucket to check against.


Return

(int[]) Array of IDs not present in the cache.


Source

File: wp-includes/functions.php

function _get_non_cached_ids( $object_ids, $cache_key ) {
	$clean = array();
	foreach ( $object_ids as $id ) {
		$id = (int) $id;
		if ( !wp_cache_get( $id, $cache_key ) ) {
			$clean[] = $id;
		}
	}

	return $clean;
}


Changelog

Changelog
Version Description
6.1.0 This function is no longer marked as "private".
3.4.0 Introduced.