update_sitemeta_cache()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
update_sitemeta_cache( array $site_ids ): array|false
Описание
Выполняет SQL-запрос для получения всех метаданных сайтов, соответствующих $site_ids, и сохраняет их в кэше.
Последующие вызовы get_site_meta() не потребуют обращения к базе данных.
Оригинал (английский)
Performs SQL query to retrieve all metadata for the sites matching $site_ids and stores them in the cache.
Subsequent calls to get_site_meta() will not need to query the database.
Параметры
$site_ids
array
обязательный
Возвращаемое значение
array|false
Исходный код
wp-includes/ms-site.php:424
function update_sitemeta_cache( $site_ids ) {
// Ensure this filter is hooked in even if the function is called early.
if ( ! has_filter( 'update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter' ) ) {
add_filter( 'update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter' );
}
return update_meta_cache( 'blog', $site_ids );
}
История изменений
| Версия | Описание |
|---|---|
| 5.1.0 | Introduced. |

