Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

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

Retrieve IDs that are not already present in the cache.

Description Description

Parameters Parameters


(int[]) (Required) Array of IDs.


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

Top ↑

Return Return

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

Top ↑

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

Top ↑

Changelog Changelog

Version Description
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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