File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
packages/cubejs-query-orchestrator/src/orchestrator Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,25 @@ export class QueryOrchestrator {
210210 * @throw ContinueWaitError
211211 */
212212 public async fetchQuery ( queryBody : QueryBody ) : Promise < any > {
213+ if ( queryBody . query && queryBody . cache === '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+
213232 const {
214233 preAggregationsTablesToTempTables,
215234 values,
You can’t perform that action at this time.
0 commit comments