Caching
Learn about caching your queries with Craft Cuery API
The API endpoints are blazingly fast. 🚀
If you are in dev mode, caching is currently disabled. This behavior will be updated soon, and caching will become configurable.
Caching Strategy
The plugin utilizes Craft's built-in caching mechanism, similar to the {% cache %}
tag in Twig.
Caches are automatically invalidated when any element in the request changes. The cache will persist based on the cacheDuration
setting defined in your configuration. You can adjust this in your Craft CMS configuration.
A new cache is created when a previously unqueried element is requested. However, simply changing the order of your GET parameters will not generate a new cache.
Eager Loading
To optimize the initial cache generation, eager loading is used to reduce the number of database queries. This is handled automatically through an internal eager loading map, so no additional configuration is required.