For example, I have three scalar cards in my dashboard, each displaying specific items via the Visualization options.
User Count,
Total income
User Average ( Total income / User Count)
These three values come from a single saved query. However, when the dashboard loads, it triggers the query three times. Can it be loaded once and shared among the three cards?
In my case, there is only ONE card/question. The query result has three values, shown in three separate dash-cards. I compared the /api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query responses and found differences only in the visualization settings.
Can this be done in the frontend to load once and render three times based on the visualization settings? The query results are the same for each instance.
Metabase will always fire a query since a card on a dashboard will have its own using dashcard ID ... but if you are saying the question isn't changing then the contents should get cached and the query should load from the cache
OK, thanks for your advice. Caching is good, but it does not suit my needs.
I do not have too many users and requests in the corporation. If the dashboard triggers 3 queries at the same time and each takes 1 second to return, the cache hit rate could be very low. If set a long cache TTL, it will be another problem.