Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22223, comment 8


Ignore:
Timestamp:
10/19/2012 01:09:18 AM (14 years ago)
Author:
ryan

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22223, comment 8

    initial v1  
    22> However, if both cache_results and split_the_query in WP_Query::get_posts() are false then the posts won't be added to the cache if get_post() doesn't wp_cache_add(). An environment using a persistent cache backend and a plugin such as advanced post cache that hasn't been updated to work with the split query would fit this scenario (cough, wordpress.com).
    33
    4 This would be good, in part, because it would restore the 3.4 intent behind cache_results = false because get_post() in the array_map() would no longer be going behind its back and doing a bunch of wp_cache_add() calls anyway.  But that would leave get_post() by post ID as the only way to get posts into cache. I suspect that passing objects to get_post() while rolling through The Loop is the main way posts are added to cache when cache_results = false, however.
     4This would be good, in part, because it would restore the 3.4 intent behind cache_results = false. get_post() in the array_map() would no longer be going behind its back and doing a bunch of wp_cache_add() calls anyway.  But that would leave get_post() by post ID as the only way to get posts into cache. I suspect that passing objects to get_post() while rolling through The Loop is the main way posts are added to cache when cache_results = false, however.