From ba9dd1d7d7dd84eabef6962e07e50e83763f1e8b Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 26 Aug 2022 01:03:14 +0000 Subject: [PATCH] Cache API, Docs: Remove private delegation from cache priming functions. Remove the private delegation from the following cache priming functions for various object types: - `_prime_post_caches()` - `_prime_term_caches()` - `_prime_comment_caches()` - `_prime_network_caches()` - `_prime_site_caches()` - `_get_non_cached_ids() ` Plugins and themes are now encouraged to use these functions to improve the performance of their code by reducing the number of database queries. Props robinwpdeveloper, desrosj, SergeyBiryukov, mukesh27, costdev. Fixes #56386. Built from https://develop.svn.wordpress.org/trunk@53944 git-svn-id: http://core.svn.wordpress.org/trunk@53503 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- wp-includes/functions.php | 2 +- wp-includes/ms-network.php | 2 +- wp-includes/ms-site.php | 2 +- wp-includes/post.php | 2 +- wp-includes/taxonomy.php | 2 +- wp-includes/version.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 4669aa41c8..4777b91dff 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -3297,7 +3297,7 @@ function update_comment_cache( $comments, $update_meta_cache = true ) { * Adds any comments from the given IDs to the cache that do not already exist in cache. * * @since 4.4.0 - * @access private + * @since 6.1.0 This function is no longer marked as "private". * * @see update_comment_cache() * @global wpdb $wpdb WordPress database abstraction object. diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 16462b07dc..12f813fa9d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -6988,7 +6988,7 @@ function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pr * Retrieves IDs that are not already present in the cache. * * @since 3.4.0 - * @access private + * @since 6.1.0 This function is no longer marked as "private". * * @param int[] $object_ids Array of IDs. * @param string $cache_key The cache bucket to check against. diff --git a/wp-includes/ms-network.php b/wp-includes/ms-network.php index ecefe4c983..5d14d69ec7 100644 --- a/wp-includes/ms-network.php +++ b/wp-includes/ms-network.php @@ -122,7 +122,7 @@ function update_network_cache( $networks ) { * Adds any networks from the given IDs to the cache that do not already exist in cache. * * @since 4.6.0 - * @access private + * @since 6.1.0 This function is no longer marked as "private". * * @see update_network_cache() * @global wpdb $wpdb WordPress database abstraction object. diff --git a/wp-includes/ms-site.php b/wp-includes/ms-site.php index 180eb81efe..fe012c5fca 100644 --- a/wp-includes/ms-site.php +++ b/wp-includes/ms-site.php @@ -339,7 +339,7 @@ function get_site( $site = null ) { * * @since 4.6.0 * @since 5.1.0 Introduced the `$update_meta_cache` parameter. - * @access private + * @since 6.1.0 This function is no longer marked as "private". * * @see update_site_cache() * @global wpdb $wpdb WordPress database abstraction object. diff --git a/wp-includes/post.php b/wp-includes/post.php index 214ab582cd..244047659d 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -7905,7 +7905,7 @@ function _update_term_count_on_transition_post_status( $new_status, $old_status, * Adds any posts from the given IDs to the cache that do not already exist in cache. * * @since 3.4.0 - * @access private + * @since 6.1.0 This function is no longer marked as "private". * * @see update_post_caches() * diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index b41321b059..c52ed8dc01 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -4005,7 +4005,7 @@ function _pad_term_counts( &$terms, $taxonomy ) { * Adds any terms from the given IDs to the cache that do not already exist in cache. * * @since 4.6.0 - * @access private + * @since 6.1.0 This function is no longer marked as "private". * * @global wpdb $wpdb WordPress database abstraction object. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 8475fdb72b..71ae37a615 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53943'; +$wp_version = '6.1-alpha-53944'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.