Variable caching when dashboard loads

Hi,

We have a dashboard that connects to a MSSQL backend. In order to reduce the number of queries to the backend database we store the data in variables and then use those variables in Text (html) panels on some parts of the page.

When we load the published link for the dashboard, the data presented initially seemed to be a cached copy of the data. If we then force a refresh or changed a variable or timerange, the data would update and display correctly. If we reload the page by putting the published link in the address bar again (not a dashboard refresh) the page would again load with the cached data initially. This isn’t browser caching.

On investigation we found that there is an option against the variables (Query Options, Refresh) to say when the data is refreshed. If this value is blank we experience this issue but if we change the option to refresh when the page is loaded the issue goes away.

Problem solved? Yes & No!

Whilst this works for the initial load, the timed refresh now stops working. Is there a way to force a refresh of the variables on page load and on a timed refresh?

Thanks

Mark
Grafana 6.2.5