import { type DataFrame, type DataQueryRequest, type ScopedVars } from '@grafana/data'; import { type PromQuery } from '../types'; type TargetIdent = string; type TargetSignature = string; type TimestampMs = number; type SupportedQueryTypes = PromQuery; type ApplyInterpolation = (str: string, scopedVars?: ScopedVars) => string; export declare const defaultPrometheusQueryOverlapWindow = "10m"; interface TargetCache { signature: TargetSignature; prevTo: TimestampMs; frames: DataFrame[]; } export interface CacheRequestInfo { requests: Array>; targetSignatures: Map; shouldCache: boolean; } /** * NOMENCLATURE * Target: The request target (DataQueryRequest), i.e. a specific query reference within a panel * Identity: the string that is not expected to change * Signature: the string that is expected to change, upon which we wipe the cache fields */ export declare class QueryCache { private overlapWindowMs; private getTargetSignature; private applyInterpolation; cache: Map; constructor(options: { getTargetSignature: (request: DataQueryRequest, target: T) => string; overlapString: string; applyInterpolation?: ApplyInterpolation; }); requestInfo(request: DataQueryRequest): CacheRequestInfo; procFrames(request: DataQueryRequest, requestInfo: CacheRequestInfo | undefined, respFrames: DataFrame[]): DataFrame[]; } export declare function findDatapointStep(request: DataQueryRequest, respFrames: DataFrame[], applyInterpolation: ApplyInterpolation): number; export {};