mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06: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:
parent
6fd8c4afcf
commit
6ffc08f429
@ -232,6 +232,12 @@ describe('when buildQueryTransaction', () => {
|
|||||||
const transaction = buildQueryTransaction('left', queries, queryOptions, range, false);
|
const transaction = buildQueryTransaction('left', queries, queryOptions, range, false);
|
||||||
expect(transaction.request.interval).toEqual('2h');
|
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', () => {
|
describe('generateEmptyQuery', () => {
|
||||||
|
@ -133,6 +133,7 @@ export function buildQueryTransaction(
|
|||||||
},
|
},
|
||||||
maxDataPoints: queryOptions.maxDataPoints,
|
maxDataPoints: queryOptions.maxDataPoints,
|
||||||
liveStreaming: queryOptions.liveStreaming,
|
liveStreaming: queryOptions.liveStreaming,
|
||||||
|
skipQueryCache: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user