wordpress-develop/tests/phpunit/tests/query
Dominik Schilling 35421f2b07 Query: Account for primed post caches without primed post meta/term caches.
In [54352] `update_post_caches()` was replaced by `_prime_post_caches()` to reduce excessive object cache calls. That's because `_prime_post_caches()` checks first if post IDs aren't already cached. Unfortunately this becomes an issue if a post itself is cached but not the meta/terms.
To fix this regression, `_prime_post_caches()` now always calls `update_postmeta_cache()` and `update_object_term_cache()` depending on the arguments passed to it. Both functions internally check whether IDs are already cached so the fix from [54352] remains in place.

Props peterwilsoncc, spacedmonkey, ocean90.
Fixes #57163.

git-svn-id: https://develop.svn.wordpress.org/trunk@54894 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 20:27:29 +00:00
..
cacheResults.php Query: Account for primed post caches without primed post meta/term caches. 2022-11-29 20:27:29 +00:00
commentCount.php Build/Test Tools: Reduce the use of unnecessary randomness in tests. 2021-12-19 13:42:37 +00:00
commentFeed.php Query: Cache post ID database query within WP_Query. 2022-08-25 04:21:40 +00:00
conditionals.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
date.php Tests: Replace some occurrences of assertEquals() with assertSame(). 2022-10-07 01:02:07 +00:00
dateQuery.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
fieldsClause.php Coding Standards: Add visibility to properties in tests/phpunit/tests/. 2022-11-29 12:40:08 +00:00
generatePostdata.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
invalidQueries.php Tests: Avoid duplicate queries in some WP_Query tests. 2022-01-14 17:50:52 +00:00
isTerm.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
metaQuery.php Coding Standards: Fix WPCS issues in [51367]. 2021-07-07 10:50:43 +00:00
noFoundRows.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
parseQuery.php Query: Be better at forcing data types for query vars. 2022-08-13 22:29:19 +00:00
postStatus.php Tests: Correct references to set_up() and tear_down() in various DocBlocks. 2022-11-22 21:25:27 +00:00
results.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
search.php Media: Refactor search by filename within the admin. 2022-10-17 11:17:38 +00:00
setupPostdata.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
stickies.php Query: Ensure that sticky post query returns all sticky posts. 2022-03-25 09:54:52 +00:00
taxQuery.php Taxonomy: Improve performance by taxonomy queries by adding a limitting requested terms. 2022-03-31 10:04:25 +00:00
vars.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
verboseRewriteRules.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00