wp_query缓存提高效率
WP_Query:内置缓存
- 三个查询变量
- cache_results
- update_post_term_cache
- update_post_meta_cache
- cache_results
- 除非使用对象缓存插件,否则默认为true。
- 将整个发布对象(数据库中的行)添加到对象缓存中。
- update_post_term_cache
- 默认为true。
- 仅在cache_results为true时有效。
- 使用分配给找到的帖子的术语填充术语缓存。
需要你有wp_query的使用经验,我主要是告诉你这些参数到底是做什么的。
你也可以看看别人写的文章