Skip to content

Commit f3b15cc

Browse files
committed
pass new cache mode in sqlApiLoad in API GW
1 parent aad3218 commit f3b15cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/cubejs-api-gateway/src/gateway.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,7 @@ class ApiGateway {
16431643
values: sqlQuery.sql[1],
16441644
continueWait: true,
16451645
renewQuery: normalizedQuery.renewQuery,
1646+
cache: normalizedQuery.cache,
16461647
requestId: context.requestId,
16471648
context,
16481649
persistent: false,
@@ -1667,6 +1668,7 @@ class ApiGateway {
16671668
values: totalQuery.sql[1],
16681669
continueWait: true,
16691670
renewQuery: normalizedTotal.renewQuery,
1671+
cache: normalizedTotal.cache,
16701672
requestId: context.requestId,
16711673
context
16721674
});
@@ -1788,6 +1790,7 @@ class ApiGateway {
17881790
values: sqlQuery.sql[1],
17891791
continueWait: true,
17901792
renewQuery: false,
1793+
cache: 'stale-if-slow',
17911794
requestId: context.requestId,
17921795
context,
17931796
persistent: true,
@@ -1981,6 +1984,7 @@ class ApiGateway {
19811984
values: sqlQuery.values || sqlQuery.sql[1],
19821985
continueWait: true,
19831986
renewQuery: false,
1987+
cache: 'stale-if-slow',
19841988
requestId: context.requestId,
19851989
context,
19861990
persistent: true,
@@ -2000,6 +2004,7 @@ class ApiGateway {
20002004
values: request.sqlQuery[1],
20012005
continueWait: true,
20022006
renewQuery: normalizedQueries[0].renewQuery,
2007+
cache: normalizedQueries[0].cache,
20032008
requestId: context.requestId,
20042009
context,
20052010
...sqlQueries[0],

0 commit comments

Comments
 (0)