Skip to content

Commit 2030eeb

Browse files
committed
move 'no-cache' variant into queryCache.cachedQueryResult()
1 parent fd2f2f2 commit 2030eeb

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export class QueryCache {
231231
queuePriority = queryBody.queuePriority;
232232
}
233233

234-
const forceNoCache = queryBody.forceNoCache || false;
234+
const forceNoCache = queryBody.forceNoCache || (queryBody.cacheMode === 'no-cache') || false;
235235

236236
const { values } = queryBody;
237237

packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -210,25 +210,6 @@ export class QueryOrchestrator {
210210
* @throw ContinueWaitError
211211
*/
212212
public async fetchQuery(queryBody: QueryBody): Promise<any> {
213-
if (queryBody.query && queryBody.cacheMode === 'no-cache') {
214-
const result = await this.queryCache.cachedQueryResult(
215-
{ ...queryBody, forceNoCache: true },
216-
[]
217-
);
218-
219-
if (result instanceof QueryStream) {
220-
return result;
221-
}
222-
223-
return {
224-
...result,
225-
dataSource: queryBody.dataSource,
226-
external: queryBody.external,
227-
usedPreAggregations: {},
228-
lastRefreshTime: new Date(),
229-
};
230-
}
231-
232213
const {
233214
preAggregationsTablesToTempTables,
234215
values,

0 commit comments

Comments
 (0)