Comments: Introduce the `cache_domain` argument for `WP_Comment_Query` to allow caching to a unique set of cache buckets.

See [18128] for `get_terms()` and [37572] for `WP_Term_Query`.

Props Chouby, rachelbaker.
Fixes #37419.
Built from https://develop.svn.wordpress.org/trunk@38117


git-svn-id: http://core.svn.wordpress.org/trunk@38058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-07-20 15:07:30 +00:00
parent efb315afb9
commit c50056a1f2
2 changed files with 5 additions and 1 deletions

View File

@ -151,6 +151,7 @@ class WP_Comment_Query {
* @since 4.4.0 Order by `comment__in` was added. `$update_comment_meta_cache`, `$no_found_rows`,
* `$hierarchical`, and `$update_comment_post_cache` were added.
* @since 4.5.0 Introduced the `$author_url` argument.
* @since 4.6.0 Introduced the `$cache_domain` argument.
* @access public
*
* @param string|array $query {
@ -250,6 +251,8 @@ class WP_Comment_Query {
* The parameter is ignored (forced to `false`) when
* `$fields` is 'ids' or 'counts'. Accepts 'threaded',
* 'flat', or false. Default: false.
* @type string $cache_domain Unique cache key to be produced when this query is stored in
* an object cache. Default is 'core'.
* @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments.
* Default true.
* @type bool $update_comment_post_cache Whether to prime the cache for comment posts.
@ -299,6 +302,7 @@ class WP_Comment_Query {
'meta_query' => '',
'date_query' => null, // See WP_Date_Query
'hierarchical' => false,
'cache_domain' => 'core',
'update_comment_meta_cache' => true,
'update_comment_post_cache' => false,
);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta3-38116';
$wp_version = '4.6-beta3-38117';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.