🗣️📊 SwiftQuery AI now lets you ask questions with natural language, or easily drag + drop →

Results caching for faster loading and less compute

Today we’re happy to announce that you can turn on results caching at a per-question level – allowing for faster results and less database load. For companies with lots of views of the same question, or long-running queries, live querying a database isn’t always ideal. Caching allows a result to be saved instead of being re-run every time. Zing lets you choose this at a per-question level, and also allows you to specify a cache duration at the question level (from 15 minutes to one month).

How caching works in Zing Data

If you turn on caching for a question, Zing temporarily stores the result of a question. This means that if you or anybody else in your organization view the question again in a short period of time, the question doesn’t need to re-run.

This has the advantage of reducing compute for questions which are accessed frequently. If you access a question after the cache duration, the question will live-run the question and store its new result for the cache duration specified.

The length of time to cache a question’s results and typically this should be aligned to the update frequency of your underlying data. For instance, if your underlying data source is updated once every 30 minutes, a cache duration of 30 minutes would be appropriate. A longer cache duration will mean that result are sometimes less fresh, and a shorter cache duration will mean you don’t get the compute savings from turning on a cache.

How to use it

By default, Zing live-queries your data as you ask questions, view queries, or deep-dive. This ensures that results are always up-to-date, and allows for real-time alerting.

Switch between live mode and cache mode on any saved question where you have editor rights by tapping ‘cache settings’ from the three dots in the upper right.

Notes

If alerts are turned on for a given question, the question must be set to live mode and cached mode cannot be activated. This is because questions with alerts enabled need to periodically check the live data for updates. If a question is cached but a user turns on alerts for that question, the caching will be turned off and the live mode will be restored. Caching is available on the standard plan and above.

More detail is available in the docs.

Related articles

Download Zing For Free

Available on iOS, Android, and the web

Learn how Zing can help you and your organization collaborate with data

Schedule Demo