Commit 7d4ecdc
feat(api-gateway): Introduce cache mode option for
* add cache option to the query
* Pass CacheMode from /cubesql to backend
* imject CacheMode into more places
* update normalizeQuery with cache mode
* pass cache mode within graphql
* pass new cache mode in sqlApiLoad in API GW
* fix types imports
* update preAggs to use cache option instead of renewQuery
* code polish
* comments with types
* fix query type
* set default cacheMode = 'stale-if-slow' in normalize()
* more types and polish
* backbone code for 'stale-if-slow' & 'stale-while-revalidate'
* make query cache aware of queryBody.cache === 'must-revalidate'
* First attempt to implement 'no-cache' scenario
* add cache to open api spec and regenerate rust client
* pass cache mode to cubeScan
* cargo clippy/fmt
* Implement background refresh
* add cache mode descriptions
* remove query cache mode from normalize query
* pass cacheMode to getSqlResponseInternal
* remove obsolete
* add cacheMode as input param in orchestratorApi
* open api spec fix
* fix cubesql after introducing cacheMode
* rename cache → cacheMode
* clean up obsolete
* pass cache_mode from SqlApiLoadPayload
* fix important
* move 'no-cache' variant into queryCache.cachedQueryResult()
* remove cacheMode from client query body types (it's incorrect)
* switch RefreshScheduler to use cacheMode instead of renewQuery
* remove obsolete continueWait flag
* fix refresh scheduler
* add fallback to renewQuery in api gw
* fix tests
* Docs
* Deprecation
* refactor api gw: move copy/paste into this.normalizeCacheMode()
* fix tests snapshots
* return cacheMode into query object
* fix tests
* some cleanup (removed renewQuery)
* update cacheMod in graphql
* return back cache as public prop in query
* fix
* lint fix
# Conflicts:
# packages/cubejs-api-gateway/package.json
* fix subscribe()
* remove cache from subscribe
* fix CacheMode serialization
* refactor: move normalizeQueryCacheMode to normalize
---------
Co-authored-by: Igor Lukanin <[email protected]>/cubesql API (#9972)1 parent 765cd77 commit 7d4ecdc
File tree
35 files changed
+364
-134
lines changed- docs/pages/product/apis-integrations
- rest-api
- packages
- cubejs-api-gateway
- src
- types
- test
- cubejs-backend-native
- js
- src
- cubejs-client-core/src
- cubejs-client-dx
- cubejs-query-orchestrator/src/orchestrator
- cubejs-server-core/src/core
- rust/cubesql
- cubeclient
- .openapi-generator
- src/models
- cubesql/src
- compile
- engine/df
- rewrite
- test
- sql
- transport
35 files changed
+364
-134
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
254 | 265 | | |
255 | 266 | | |
256 | 267 | | |
| |||
295 | 306 | | |
296 | 307 | | |
297 | 308 | | |
| 309 | + | |
298 | 310 | | |
299 | 311 | | |
300 | 312 | | |
| |||
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
316 | | - | |
| 328 | + | |
| 329 | + | |
Lines changed: 0 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 44 | | |
56 | 45 | | |
57 | 46 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | | - | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| |||
639 | 641 | | |
640 | 642 | | |
641 | 643 | | |
642 | | - | |
| 644 | + | |
| 645 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
487 | 494 | | |
488 | 495 | | |
489 | 496 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
180 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
181 | 191 | | |
182 | 192 | | |
183 | 193 | | |
| |||
311 | 321 | | |
312 | 322 | | |
313 | 323 | | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
| |||
320 | 331 | | |
321 | 332 | | |
322 | 333 | | |
323 | | - | |
| 334 | + | |
| 335 | + | |
324 | 336 | | |
325 | 337 | | |
326 | 338 | | |
| |||
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
332 | | - | |
| 344 | + | |
| 345 | + | |
333 | 346 | | |
334 | 347 | | |
335 | 348 | | |
| |||
425 | 438 | | |
426 | 439 | | |
427 | 440 | | |
428 | | - | |
| 441 | + | |
429 | 442 | | |
430 | 443 | | |
431 | 444 | | |
| |||
1200 | 1213 | | |
1201 | 1214 | | |
1202 | 1215 | | |
| 1216 | + | |
1203 | 1217 | | |
1204 | 1218 | | |
1205 | 1219 | | |
| |||
1240 | 1254 | | |
1241 | 1255 | | |
1242 | 1256 | | |
1243 | | - | |
| 1257 | + | |
1244 | 1258 | | |
1245 | 1259 | | |
1246 | 1260 | | |
| |||
1285 | 1299 | | |
1286 | 1300 | | |
1287 | 1301 | | |
1288 | | - | |
| 1302 | + | |
1289 | 1303 | | |
1290 | 1304 | | |
1291 | 1305 | | |
1292 | 1306 | | |
1293 | 1307 | | |
1294 | | - | |
| 1308 | + | |
1295 | 1309 | | |
1296 | 1310 | | |
1297 | 1311 | | |
| |||
1637 | 1651 | | |
1638 | 1652 | | |
1639 | 1653 | | |
1640 | | - | |
| 1654 | + | |
1641 | 1655 | | |
1642 | 1656 | | |
1643 | 1657 | | |
1644 | | - | |
1645 | | - | |
| 1658 | + | |
1646 | 1659 | | |
1647 | 1660 | | |
1648 | 1661 | | |
| |||
1665 | 1678 | | |
1666 | 1679 | | |
1667 | 1680 | | |
1668 | | - | |
1669 | | - | |
| 1681 | + | |
1670 | 1682 | | |
1671 | 1683 | | |
1672 | 1684 | | |
| |||
1782 | 1794 | | |
1783 | 1795 | | |
1784 | 1796 | | |
1785 | | - | |
| 1797 | + | |
1786 | 1798 | | |
1787 | 1799 | | |
1788 | 1800 | | |
1789 | | - | |
1790 | | - | |
| 1801 | + | |
1791 | 1802 | | |
1792 | 1803 | | |
1793 | 1804 | | |
| |||
1826 | 1837 | | |
1827 | 1838 | | |
1828 | 1839 | | |
| 1840 | + | |
1829 | 1841 | | |
1830 | 1842 | | |
1831 | 1843 | | |
| |||
1847 | 1859 | | |
1848 | 1860 | | |
1849 | 1861 | | |
1850 | | - | |
| 1862 | + | |
1851 | 1863 | | |
1852 | 1864 | | |
1853 | 1865 | | |
| |||
1941 | 1953 | | |
1942 | 1954 | | |
1943 | 1955 | | |
| 1956 | + | |
1944 | 1957 | | |
1945 | 1958 | | |
1946 | 1959 | | |
| |||
1955 | 1968 | | |
1956 | 1969 | | |
1957 | 1970 | | |
1958 | | - | |
| 1971 | + | |
1959 | 1972 | | |
1960 | 1973 | | |
1961 | 1974 | | |
| |||
1970 | 1983 | | |
1971 | 1984 | | |
1972 | 1985 | | |
1973 | | - | |
| 1986 | + | |
1974 | 1987 | | |
1975 | 1988 | | |
1976 | 1989 | | |
1977 | 1990 | | |
1978 | | - | |
| 1991 | + | |
1979 | 1992 | | |
1980 | 1993 | | |
1981 | 1994 | | |
1982 | | - | |
1983 | | - | |
| 1995 | + | |
1984 | 1996 | | |
1985 | 1997 | | |
1986 | 1998 | | |
| |||
1995 | 2007 | | |
1996 | 2008 | | |
1997 | 2009 | | |
1998 | | - | |
| 2010 | + | |
1999 | 2011 | | |
2000 | 2012 | | |
2001 | | - | |
2002 | | - | |
| 2013 | + | |
2003 | 2014 | | |
2004 | 2015 | | |
2005 | 2016 | | |
| |||
2133 | 2144 | | |
2134 | 2145 | | |
2135 | 2146 | | |
2136 | | - | |
| 2147 | + | |
2137 | 2148 | | |
2138 | 2149 | | |
2139 | 2150 | | |
| |||
0 commit comments