posts数组导致WP_Query 已映射到get_post() (here 和here) 使用:
$this->posts = array_map( \'get_post\', $this->posts );
这似乎是在向对象缓存添加POST,即使
cache_results 参数设置为
false 在里面
WP_Query.
在get_post() 功能(here) 我们有:
$_post = WP_Post::get_instance( $post );
对于以下情况:
$post 都不是
WP_Post 或对象实例。
这个WP_Post::get_instance method 包含wp_cache_get() 和wp_cache_set() 呼叫。
这可以解释你在例子中看到的行为。