Title: Query cache
Author: WordPress VIP Documentation
Published: September 15, 2020
Last modified: May 26, 2025

---

 1. [Caching](https://docs.wpvip.com/caching/)
 2. Query cache

#  Query cache

The Query Cache provides light-weight and transparent in-memory caching of many 
database queries (such as post lookups) which reduces the overall load on the database
and results in a faster, more-scalable site.

All application code that uses the [WP_Query API](https://developer.wordpress.org/reference/classes/wp_query/)
will automatically benefit from this caching layer.

Most write operations will flush this cache (such as post updates and comments) 
to ensure fresh data. Because of this, it is important to cache expensive queries
in a more persistent way, using [object caching](https://docs.wpvip.com/caching/object-cache/).

Last updated: May 26, 2025