Skip to content

Commit b8a1665

Browse files
committed
update normalizeQuery with cache mode
1 parent 485dc33 commit b8a1665

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/cubejs-api-gateway/src/query.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,15 @@ const normalizeQuery = (query, persistent) => {
336336
newLimit = query.limit;
337337
}
338338

339+
let cacheMode = query.cache;
340+
// Convert deprecated renewQuery option to new cache mode
341+
if (query.renewQuery && !query.cache) {
342+
cacheMode = 'must-revalidate';
343+
}
344+
339345
return {
340346
...query,
347+
...{ cache: cacheMode },
341348
...(query.order ? { order: normalizeQueryOrder(query.order) } : {}),
342349
limit: newLimit,
343350
timezone,

0 commit comments

Comments
 (0)