Uma área de pesquisa sobre o WordPress para devs e autores do tema



_get_non_cached_ids ›

Desde3.4.0
Obsoleton/a
_get_non_cached_ids ( $object_ids, $cache_key )
Acesso:
  • private
Parâmetros: (2)
  • (int[]) $object_ids Array of IDs.
    Required: Yes
  • (string) $cache_key The cache bucket to check against.
    Required: Yes
Retorna:
  • (int[]) Array of IDs not present in the cache.
Definido em:
Codex:

Retrieve IDs that are not already present in the cache.



Fonte

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