mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
Prometheus: mark queries with instant results as invalid for incremental querying (#66846)
mark queries with instant results as invalid for incremental querying
This commit is contained in:
parent
5dac0c9871
commit
a90289a193
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user