Cache global or per panel? #261
Replies: 2 comments 4 replies
-
+1 for the dashboard-wide cache, it would be useful to reduce the load on the server in situations where one needs to feed data from the same API call into different panels, each with its own JSONPath field specifications. Unfortunately however I'm not sure if it's feasible since if I understand correctly Grafana loads data for the various panels in a dashboard in parallel. Thus it's not like it loads panel A first, making the API call, then loads panel B which can use the cached result, but loads both A and B in parallel thus making the request twice even if it's identical. Maybe someone with deeper knowledge of Grafana internals can confirm this? |
Beta Was this translation helpful? Give feedback.
-
I believe this is how most data sources in Grafana work. Have you tried the Dashboard data source? I'm afraid that to support something like this, we'd need to move the plugin server-side, which is a non-trivial feature, and (in this case) requires a major rewrite. In the meantime, could you potentially set up NGINX to cache things across queries? |
Beta Was this translation helpful? Give feedback.
-
I was expecting that the datasource has a central cache and not a cache per panel. My tries let me assume that is not the case.
I have a dashboard that uses the same URL in approx. 10 dashboards resulting in fetching the same data 10 times.
Is that a bug? Is that expected behaviour? If it is expected, can I ask for a new feature to share the cache between different panels (or even dashboards)?
Beta Was this translation helpful? Give feedback.
All reactions