Jonny Harris 92a8bd811f Query: Save excessive cache add and sets in WP_Query.
In [53941] database query caching was added to `WP_Query`. However on sites with persistent object caching enabled, this resulted in a high number of unnecessary cache set and adds being run on every request. Caches are not set, if the query cache already exists and is cached. Replace usage of `update_post_caches` with `_prime_post_caches` to ensure that only posts that are not in cache are primed. 

Props spacedmonkey, peterwilsoncc, mukesh27.
See #22176.

git-svn-id: https://develop.svn.wordpress.org/trunk@54352 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-29 10:07:34 +00:00
..