`WP_Comment_Query` now fetches comments in two stages: (1) a query to get the
IDs of comments matching the query vars, and (2) a query to populate the
objects corresponding to the matched IDs. The two queries are cached
separately, so that sites with persistent object caches will continue to have
complete cache coverage for normal comment queries.
Splitting the query allows our cache strategy to be more modest and precise, as
full comment data is only stored once per comment. It also makes it possible
to introduce logic for paginated threading, which is necessary to address
certain performance problems.
See #8071.
data is only stored once per comment, instead of along with
Built from https://develop.svn.wordpress.org/trunk@34310
git-svn-id: http://core.svn.wordpress.org/trunk@34274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The new 'update_comment_meta_cache' parameter, which defaults to `true`, can
be used to disable this behavior.
`update_comment_cache()` has been updated to support an `$update_meta_cache`
parameter, which also updates to true; this matches the pattern we use for
priming post caches.
See #16894.
Built from https://develop.svn.wordpress.org/trunk@34268
git-svn-id: http://core.svn.wordpress.org/trunk@34232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Takes inspiration from `WP_Post` and adds sanity to comment caching.
* Clarifies when the current global value for `$comment` is returned. The current implementation in `get_comment()` introduces side effects and an occasion stale global value for `$comment` when comment caches are cleaned.
* Strongly-types `@param` docs
* This class is marked `final` for now
Props wonderboymusic, nacin.
See #32619.
Built from https://develop.svn.wordpress.org/trunk@33891
git-svn-id: http://core.svn.wordpress.org/trunk@33860 1a063a9b-81f0-0310-95a4-ce76da25c4cd