_get_non_cached_ids
Retrieve ids that are not already present in the cache.
Description
Returns (array)
List of ids not present in the cache.
Parameters (2)
- 0. $object_ids (array)
- The object ids.
- 1. $cache_key (string)
- The cache bucket to check against.
Usage
if ( !function_exists( '_get_non_cached_ids' ) ) { require_once ABSPATH . WPINC . '/functions.php'; } // The object ids. $object_ids = array(); // The cache bucket to check against. $cache_key = ''; // NOTICE! Understand what this does before running. $result = _get_non_cached_ids($object_ids, $cache_key);
Defined (1)
The function is defined in the following location(s).
- /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;
- }