mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 11:32:25 +08:00
Explore: Set X-Cache-Skip to true for query requests (#85460)
Explore: set X-Cache-Skip to true for query requests
This commit is contained in:
@ -232,6 +232,12 @@ describe('when buildQueryTransaction', () => {
|
||||
const transaction = buildQueryTransaction('left', queries, queryOptions, range, false);
|
||||
expect(transaction.request.interval).toEqual('2h');
|
||||
});
|
||||
it('it should create a request with X-Cache-Skip set to true', () => {
|
||||
const queries = [{ refId: 'A' }];
|
||||
const range = { from: dateTime().subtract(1, 'd'), to: dateTime(), raw: { from: '1h', to: '1h' } };
|
||||
const transaction = buildQueryTransaction('left', queries, {}, range, false);
|
||||
expect(transaction.request.skipQueryCache).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('generateEmptyQuery', () => {
|
||||
|
@ -133,6 +133,7 @@ export function buildQueryTransaction(
|
||||
},
|
||||
maxDataPoints: queryOptions.maxDataPoints,
|
||||
liveStreaming: queryOptions.liveStreaming,
|
||||
skipQueryCache: true,
|
||||
};
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user