wp_cache_delete_multiple()WP 6.0.0

Deletes multiple values from the cache in one call.

Compat function to mimic wp_cache_delete_multiple().

Хуков нет.

Возвращает

true|false[]. Array of return values, grouped by key. Each value is either true on success, or false if the contents were not deleted.

Использование

wp_cache_delete_multiple( $keys, $group );
$keys(массив) (обязательный)
Array of keys under which the cache to deleted.
$group(строка)
Where the cache contents are grouped.
По умолчанию: ''

Заметки

Список изменений

С версии 6.0.0 Введена.

Код wp_cache_delete_multiple() WP 6.0.1

function wp_cache_delete_multiple( array $keys, $group = '' ) {
	$values = array();

	foreach ( $keys as $key ) {
		$values[ $key ] = wp_cache_delete( $key, $group );
	}

	return $values;
}