Improvements to WP_Query performance in 6.1

Adding caching to database queries in WP_Query
WordPress 6.1 includes an improvement to how database queries are performed in the WP_Query class, resulting in database queries will be cached. This means that if the same database query is run more than once, the result will be loaded from cache. For those using persistent object caching, this will mean that the database query will not run again until caches are invalidated, resulting in far fewer queries to the database. Sites using in-memory caching will also see the benefit of not repeating these queries, though the performance improvement will not be as significant. 

This post was originally published on Make Core by Jonny Harris.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.