Caching query not working properly

Hi,
I am a non-tech standard user of Retool and I am struggling to activate query caching for my query mart_echos_agira (within my app Echos AGIRA.

My query is heavy (about 15 sec loading time) and keeps refreshing everytime a user saves his action, so that the main table gets refreshed accordingly -> this is painful in terms of UX and in terms of volumetry of runs.

However the underlying SQL table doesn't change much within a 24-hour timeframe so I thought caching the query through Advanced settings would do the job.
So I might forget something because when I set a eg 20 000 sec cache duration, the main table returns "No row found" and the caching doesn't seem to work (see screenshot).

Could anyone help me with limited technical complexity to help me find a solution to avoid the heavy query to constantly run ? :innocent:

2 Likes

Hi @max_dx Thanks for reaching out!

Query caching in the Advanced tab sounds like a great idea :blush:

I haven't been able to reproduce this issue yet :thinking: When I add 20000 to the cache duration on a BigQuery read query, I can see that it is pulling my data from the cache.

If you check mart_echos_agira.lastReceivedFromResourceAt, does it update every time you run the query? You can format it in a transformer like:
{{moment(mart_echos_agira.lastReceivedFromResourceAt).toLocaleString()}}

Do you know if you have Cache queries across all users enabled under the organization's Advanced settings?