What is the WordPress `WP_Query` ‘cache_results’ parameter and the complete set of caching parameters, and how do they interact with persistent object caching?

WordPress Expert Hard

WordPress Expert — Hard

What is the WordPress `WP_Query` ‘cache_results’ parameter and the complete set of caching parameters, and how do they interact with persistent object caching?

Key points

  • 'cache_results' caches post objects in WP_Query
  • 'update_post_meta_cache', 'update_post_term_cache', and 'update_menu_item_cache' are other caching parameters
  • Persistent caching keeps primed caches across requests
  • Setting caching parameters to false avoids priming cache unnecessarily

Ready to go further?

Related questions