Query caching and scheduling

How to control when your queries run.

Enable caching in your workspace

Caching must first be enabled in your workspace settings:

For workspaces where caching is enabled, the default cache duration for new canvases can also be set

Query result caching is only available on paid plans.

View canvas caching settings

In the right sidebar, when no objects are selected the current caching settings for the canvas are displayed. To update these settings, click the Change button.

These settings are only accessible by analysts and above.

Caching settings

In the caching settings menu, there are three options for caching query results:

The Caching settings menu.

Never cache results

With this setting, whenever your canvas or report is opened, the queries for any visible cells will be sent to your database, ensuring the most up-to-date data possible. This option will result in the largest load on your database.

Cache results for...

With this setting, query results are saved for the specified duration. If the same query is run repeatedly within that time window, then cached results are returned. This option is often a reasonable trade-off between improving result freshness while reducing load on your database.

If cells are edited or executed using the Run cell button, then queries are always re-run.

Cache results indefinitely

With this setting, queries will not run unless cells are edited or executed using the Run cell button. This option minimises database load, but may result in old data being displayed.

Scheduling settings

If a schedule is selected, Count will execute the cells in this canvas that are connected to databases periodically. These scheduled queries are always run, even if cached results are available, and the new results will update those in the cache.

By default all canvas cells are executed, but it is possible to execute fewer cells by hiding or disabling cells, and choosing the appropriate option.

The scheduling settings.

Several simple schedules can be selected from the options here. For more custom schedules, choose the Custom option to enter a schedule in the form of a cron expression.

For example, to schedule a run at 8AM on weekdays only, enter 0 8 * * 1-5 . Note that cron custom expressions are always based on the UTC timezone.

Last updated