diff --git a/public/app/plugins/datasource/prometheus/querycache/QueryCache.ts b/public/app/plugins/datasource/prometheus/querycache/QueryCache.ts index 1551139fd8d..2ba7ca76c42 100644 --- a/public/app/plugins/datasource/prometheus/querycache/QueryCache.ts +++ b/public/app/plugins/datasource/prometheus/querycache/QueryCache.ts @@ -235,7 +235,7 @@ export class QueryCache { const newTo = request.range.to.valueOf(); // only cache 'now'-relative queries (that can benefit from a backfill cache) - const shouldCache = request.rangeRaw?.to?.toString() === 'now'; + const shouldCache = request.rangeRaw?.to?.toString() === 'now' && !request.targets.some((targ) => targ.instant); // all targets are queried together, so we check for any that causes group cache invalidation & full re-query let doPartialQuery = shouldCache;