WordPress at a glance
function is not described

_get_non_cached_ids() WP 3.4.0

Retrieve IDs that are not already present in the cache.

No Hooks.


Int[]. Array of IDs not present in the cache.


_get_non_cached_ids( $object_ids, $cache_key );
$object_ids(int[]) (required)
Array of IDs.
$cache_key(string) (required)
The cache bucket to check against.

Code of get non cached ids: wp-includes/functions.php WP 5.2.2

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;