Skip to content

Commit 5303ba1

Browse files
committed
feat(client-core): provide cache option to load method
1 parent 6abbdb3 commit 5303ba1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/cubejs-client-core/src/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export type LoadMethodOptions = {
5050
* AbortSignal to cancel requests
5151
*/
5252
signal?: AbortSignal;
53+
/**
54+
* Cache mode for query execution
55+
*/
56+
cache?: CacheMode;
5357
};
5458

5559
export type DeeplyReadonly<T> = {
@@ -108,10 +112,6 @@ export type CubeSqlOptions = LoadMethodOptions & {
108112
* Query timeout in milliseconds
109113
*/
110114
timeout?: number;
111-
/**
112-
* Cache mode for query execution
113-
*/
114-
cache?: CacheMode;
115115
};
116116

117117
export type CubeSqlSchemaColumn = {
@@ -574,7 +574,8 @@ class CubeApi {
574574
() => this.request('load', {
575575
query,
576576
queryType: 'multi',
577-
signal: options?.signal
577+
cache: options?.cache,
578+
signal: options?.signal,
578579
}),
579580
(response: any) => this.loadResponseInternal(response, options),
580581
options,

0 commit comments

Comments
 (0)