From cd95e28c30fd7f2800b4210a86e3309cfb7ad50a Mon Sep 17 00:00:00 2001 From: Mitch Seaman Date: Fri, 9 Jul 2021 10:16:02 +0200 Subject: [PATCH] Docs: Document which data sources work with caching (#36561) * Document which data sources work with caching * add Prometheus and Loki to exclusions * update list of built-in data sources I checked in Grafana v8.0.4 and these were the built-in data sources that do work with query caching. * Apply suggestions from code review Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * alphabetize list Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> --- docs/sources/enterprise/query-caching.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/sources/enterprise/query-caching.md b/docs/sources/enterprise/query-caching.md index 799f2cd0ed1..d57c3d8c8c7 100644 --- a/docs/sources/enterprise/query-caching.md +++ b/docs/sources/enterprise/query-caching.md @@ -27,6 +27,23 @@ You can make a panel retrieve fresh data more frequently by increasing the **Max - Reduced API costs. - Reduced likelihood that APIs will rate-limit or throttle requests. +## Data sources that work with query caching + +Query caching works for all [Enterprise data sources](https://grafana.com/grafana/plugins/?type=datasource&enterprise=1), and it works for the following [built-in data sources]({{< relref "../datasources/_index.md" >}}): +- CloudWatch +- Google Cloud Monitoring +- InfluxDB +- Microsoft SQL Server +- MySQL +- Postgres +- Tempo + +Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries themselves, so Grafana query caching does not improve performance. + +Query caching also works for all data sources that include a backend. More specifically, caching works with data sources that extend the `DataSourceWithBackend` class in the plugins SDK. + +To tell if a data source works with query caching, follow the instructions below to **Enable and Configure query caching**. If caching is enabled in Grafana but the Caching tab is not visible for the given data source, then query caching is not available for that data source. + ## Enable and configure query caching You must be an Org admin or Grafana admin to enable query caching for a data source. For more information on Grafana roles and permissions, visit the [Permissions page]({{< relref "../permissions/_index.md" >}}).