@gooddata/sdk-backend-base 11.48.0 → 11.49.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,10 @@ export type CacheControl = {
29
29
  * Resets all workspace facts caches.
30
30
  */
31
31
  resetFacts: () => void;
32
+ /**
33
+ * Resets all workspace dataset caches.
34
+ */
35
+ resetDatasets: () => void;
32
36
  /**
33
37
  * Resets all workspace settings caches.
34
38
  */
@@ -285,6 +289,33 @@ export type CachingConfiguration = {
285
289
  * tweak the `maxMeasuresWorkspaces` value.
286
290
  */
287
291
  maxMeasuresPerWorkspace?: number;
292
+ /**
293
+ * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceDatasetsService} calls.
294
+ * The workspace identifier is used as cache key.
295
+ * For each workspace, there will be a cache entry holding `maxDatasetsPerWorkspace` entries for dataset metadata reads.
296
+ *
297
+ * When limit is reached, cache entries will be evicted using LRU policy.
298
+ *
299
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded
300
+ * cache may be OK in applications where number of workspaces is small - the cache will be limited
301
+ * naturally and will not grow uncontrollably.
302
+ *
303
+ * When non-positive number is specified, then no caching will be done.
304
+ */
305
+ maxDatasetWorkspaces?: number;
306
+ /**
307
+ * Maximum number of datasets to cache per workspace.
308
+ *
309
+ * When limit is reached, cache entries will be evicted using LRU policy.
310
+ *
311
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded
312
+ * dataset cache may be OK in applications where number of datasets is small and/or they are requested
313
+ * infrequently - the cache will be limited naturally and will not grow uncontrollably.
314
+ *
315
+ * Setting non-positive number here is invalid. If you want to turn off dataset caching,
316
+ * tweak the `maxDatasetWorkspaces` value.
317
+ */
318
+ maxDatasetsPerWorkspace?: number;
288
319
  /**
289
320
  * Maximum number of organizations for which to cache organization-level export templates.
290
321
  * Organization export templates are organization-level, so typically a single entry suffices.
@@ -330,6 +361,34 @@ export type CachingConfiguration = {
330
361
  * tweak the `maxAttributeWorkspaces` value.
331
362
  */
332
363
  maxAttributesPerWorkspace?: number;
364
+ /**
365
+ * Maximum number of common attribute results to cache per workspace.
366
+ *
367
+ * This bounds the cache used by `getCommonAttributes` and `getCommonAttributesBatch`, keyed by the
368
+ * (order-independent) set of input attribute references.
369
+ *
370
+ * When limit is reached, cache entries will be evicted using LRU policy.
371
+ *
372
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen.
373
+ *
374
+ * Setting non-positive number here is invalid. If you want to turn off common attribute caching,
375
+ * tweak the `maxAttributeWorkspaces` value.
376
+ */
377
+ maxCommonAttributesPerWorkspace?: number;
378
+ /**
379
+ * Maximum number of connected attribute results to cache per workspace.
380
+ *
381
+ * This bounds the cache used by `getConnectedAttributesByDisplayForm`, keyed by the display form
382
+ * reference identifier/uri.
383
+ *
384
+ * When limit is reached, cache entries will be evicted using LRU policy.
385
+ *
386
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen.
387
+ *
388
+ * Setting non-positive number here is invalid. If you want to turn off connected attribute caching,
389
+ * tweak the `maxAttributeWorkspaces` value.
390
+ */
391
+ maxConnectedAttributesPerWorkspace?: number;
333
392
  /**
334
393
  * Maximum number of attribute element results to cache per workspace.
335
394
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cachingBackend/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAGH,KAAK,kBAAkB,EA+C1B,MAAM,2BAA2B,CAAC;AA2zEnC;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;OAEG;IACH,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC;;OAEG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC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, idRef, isIdentifierRef, isUriRef, objRef
9
9
  import { DecoratedWorkspaceAttributesService } from "../decoratedBackend/attributes.js";
10
10
  import { DecoratedAutomationsQuery, DecoratedWorkspaceAutomationsService, } from "../decoratedBackend/automations.js";
11
11
  import { DecoratedWorkspaceCatalogFactory } from "../decoratedBackend/catalog.js";
12
+ import { DecoratedWorkspaceDatasetsService } from "../decoratedBackend/datasets.js";
12
13
  import { DecoratedElementsQuery, DecoratedElementsQueryFactory } from "../decoratedBackend/elements.js";
13
14
  import { DecoratedDataView, DecoratedExecutionFactory, DecoratedExecutionResult, DecoratedPreparedExecution, } from "../decoratedBackend/execution.js";
14
15
  import { DecoratedWorkspaceFactsService } from "../decoratedBackend/facts.js";
@@ -673,6 +674,23 @@ function elementsCacheKey(ref, settings) {
673
674
  const fingerprint = stringify(settings) || "undefined";
674
675
  return new SparkMD5().append(objRefToString(ref)).append(fingerprint).end();
675
676
  }
677
+ /**
678
+ * Returns the identifier- and uri-based cache keys for the given ref. A ref yields at most one of the two.
679
+ */
680
+ function refCacheKeys(ref) {
681
+ return {
682
+ idCacheKey: isIdentifierRef(ref) ? ref.identifier : undefined,
683
+ uriCacheKey: isUriRef(ref) ? ref.uri : undefined,
684
+ };
685
+ }
686
+ /**
687
+ * Builds a stable cache key for a set of refs. The order of refs does not matter (the refs are sorted),
688
+ * so callers requesting the same set in a different order share the same cache entry.
689
+ */
690
+ function refSetCacheKey(refs) {
691
+ const serialized = refs.map(objRefToString).sort();
692
+ return new SparkMD5().append(stringify(serialized) || "undefined").end();
693
+ }
676
694
  function getOrCreateAttributeCache(ctx, workspace) {
677
695
  const cache = ctx.caches.workspaceAttributes;
678
696
  let cacheEntry = cache.get(workspace);
@@ -687,6 +705,18 @@ function getOrCreateAttributeCache(ctx, workspace) {
687
705
  attributesByDisplayForms: new LRUCache({
688
706
  max: ctx.config.maxAttributesPerWorkspace,
689
707
  }),
708
+ attributes: new LRUCache({
709
+ max: ctx.config.maxAttributesPerWorkspace,
710
+ }),
711
+ commonAttributes: new LRUCache({
712
+ max: (ctx.config.maxCommonAttributesPerWorkspace ?? ctx.config.maxAttributesPerWorkspace),
713
+ }),
714
+ commonAttributesBatch: new LRUCache({
715
+ max: (ctx.config.maxCommonAttributesPerWorkspace ?? ctx.config.maxAttributesPerWorkspace),
716
+ }),
717
+ connectedAttributes: new LRUCache({
718
+ max: (ctx.config.maxConnectedAttributesPerWorkspace ?? ctx.config.maxAttributesPerWorkspace),
719
+ }),
690
720
  attributeElementResults: cachingEnabled(ctx.config.maxAttributeElementResultsPerWorkspace)
691
721
  ? new LRUCache({
692
722
  max: ctx.config.maxAttributeElementResultsPerWorkspace,
@@ -856,6 +886,168 @@ class WithAttributesCaching extends DecoratedWorkspaceAttributesService {
856
886
  }
857
887
  return cacheItem;
858
888
  };
889
+ getAttribute = (ref, opts = {}) => {
890
+ const cache = getOrCreateAttributeCache(this.ctx, this.workspace).attributes;
891
+ // The `include` option changes the shape of the returned object, so it must be part of the key.
892
+ // With the default (empty) options the key is just the identifier/uri, which lets `getAttribute`
893
+ // share cached entries with the bulk `getAttributes` method.
894
+ const suffix = opts.include?.length ? `:${opts.include.join(",")}` : "";
895
+ const { idCacheKey, uriCacheKey } = refCacheKeys(ref);
896
+ const idKey = idCacheKey && `${idCacheKey}${suffix}`;
897
+ const uriKey = uriCacheKey && `${uriCacheKey}${suffix}`;
898
+ let cacheItem = firstDefined([idKey, uriKey].map((key) => key && cache.get(key)));
899
+ if (!cacheItem) {
900
+ cacheItem = super.getAttribute(ref, opts).catch((e) => {
901
+ if (idKey) {
902
+ cache.delete(idKey);
903
+ }
904
+ if (uriKey) {
905
+ cache.delete(uriKey);
906
+ }
907
+ throw e;
908
+ });
909
+ if (idKey) {
910
+ cache.set(idKey, cacheItem);
911
+ }
912
+ if (uriKey) {
913
+ cache.set(uriKey, cacheItem);
914
+ }
915
+ }
916
+ // The shared `attributes` cache can momentarily hold an in-flight bulk entry that resolves to
917
+ // `undefined` for a ref the server omitted. Guard against it so the scalar contract (an attribute
918
+ // or a rejection) is preserved; such a gap is never written back to the cache.
919
+ return cacheItem.then((value) => value ?? this.decorated.getAttribute(ref, opts));
920
+ };
921
+ getAttributes = async (refs) => {
922
+ const cache = getOrCreateAttributeCache(this.ctx, this.workspace).attributes;
923
+ // Grab a reference to the cache results as soon as possible in case they would get evicted while
924
+ // loading the ones missing from the cache.
925
+ const refsWithCacheResults = refs.map((ref) => {
926
+ const { idCacheKey, uriCacheKey } = refCacheKeys(ref);
927
+ const cacheHit = firstDefined([idCacheKey, uriCacheKey].map((key) => key && cache.get(key)));
928
+ return {
929
+ ref,
930
+ idCacheKey,
931
+ uriCacheKey,
932
+ cacheHit: cacheHit,
933
+ };
934
+ });
935
+ const [withCacheHits, withoutCacheHits] = partition(refsWithCacheResults, ({ cacheHit }) => !!cacheHit);
936
+ const refsToLoad = withoutCacheHits.map((item) => item.ref);
937
+ // Use a single shared load promise so that concurrent callers asking for the same uncached refs
938
+ // collapse onto one underlying request. Per-ref promises are derived from it and registered into
939
+ // the cache synchronously - before any await - so a concurrent caller sees the in-flight promise.
940
+ const loadPromise = refsToLoad.length > 0
941
+ ? Promise.resolve(this.decorated.getAttributes(refsToLoad))
942
+ : Promise.resolve([]);
943
+ withoutCacheHits.forEach((item) => {
944
+ const perRefPromise = loadPromise
945
+ .then((loaded) => {
946
+ const match = loaded.find((attribute) => refMatchesMdObject(item.ref, attribute, "attribute"));
947
+ if (!match) {
948
+ // The server omitted this ref; evict so a later call can retry it.
949
+ if (item.idCacheKey) {
950
+ cache.delete(item.idCacheKey);
951
+ }
952
+ if (item.uriCacheKey) {
953
+ cache.delete(item.uriCacheKey);
954
+ }
955
+ }
956
+ return match;
957
+ })
958
+ .catch((e) => {
959
+ if (item.idCacheKey) {
960
+ cache.delete(item.idCacheKey);
961
+ }
962
+ if (item.uriCacheKey) {
963
+ cache.delete(item.uriCacheKey);
964
+ }
965
+ throw e;
966
+ });
967
+ // Prevent an unhandled rejection if nobody else awaits this per-ref promise (the primary caller
968
+ // below awaits `loadPromise` directly). Concurrent callers awaiting the cached promise still see
969
+ // the rejection through their own reference.
970
+ perRefPromise.catch(() => undefined);
971
+ item.cacheHit = perRefPromise;
972
+ if (item.idCacheKey) {
973
+ cache.set(item.idCacheKey, perRefPromise);
974
+ }
975
+ if (item.uriCacheKey) {
976
+ cache.set(item.uriCacheKey, perRefPromise);
977
+ }
978
+ });
979
+ const [loadedFromServer, alreadyInCache] = await Promise.all([
980
+ loadPromise,
981
+ Promise.all(withCacheHits.map((item) => item.cacheHit)),
982
+ ]);
983
+ const loadedRefs = loadedFromServer.map((item) => item.ref);
984
+ const outputRefs = this.ctx.capabilities.allowsInconsistentRelations
985
+ ? skipMissingReferences(refs, refsToLoad, loadedRefs)
986
+ : refs;
987
+ // reconstruct the original ordering
988
+ const candidates = compact([...loadedFromServer, ...alreadyInCache]);
989
+ return outputRefs
990
+ .map((ref) => candidates.find((item) => refMatchesMdObject(ref, item, "attribute")))
991
+ .filter((match) => {
992
+ // When the backend guarantees consistent relations, every requested ref must resolve.
993
+ if (!match) {
994
+ invariant(this.ctx.capabilities.allowsInconsistentRelations);
995
+ return false;
996
+ }
997
+ return true;
998
+ });
999
+ };
1000
+ getCommonAttributes = (attributeRefs) => {
1001
+ const cache = getOrCreateAttributeCache(this.ctx, this.workspace).commonAttributes;
1002
+ const cacheKey = refSetCacheKey(attributeRefs);
1003
+ let result = cache.get(cacheKey);
1004
+ if (!result) {
1005
+ result = super.getCommonAttributes(attributeRefs).catch((e) => {
1006
+ cache.delete(cacheKey);
1007
+ throw e;
1008
+ });
1009
+ cache.set(cacheKey, result);
1010
+ }
1011
+ return result;
1012
+ };
1013
+ getCommonAttributesBatch = (attributesRefsBatch) => {
1014
+ const cache = getOrCreateAttributeCache(this.ctx, this.workspace).commonAttributesBatch;
1015
+ const cacheKey = new SparkMD5()
1016
+ .append(stringify(attributesRefsBatch.map(refSetCacheKey)) || "undefined")
1017
+ .end();
1018
+ let result = cache.get(cacheKey);
1019
+ if (!result) {
1020
+ result = super.getCommonAttributesBatch(attributesRefsBatch).catch((e) => {
1021
+ cache.delete(cacheKey);
1022
+ throw e;
1023
+ });
1024
+ cache.set(cacheKey, result);
1025
+ }
1026
+ return result;
1027
+ };
1028
+ getConnectedAttributesByDisplayForm = (ref) => {
1029
+ const cache = getOrCreateAttributeCache(this.ctx, this.workspace).connectedAttributes;
1030
+ const { idCacheKey, uriCacheKey } = refCacheKeys(ref);
1031
+ let cacheItem = firstDefined([idCacheKey, uriCacheKey].map((key) => key && cache.get(key)));
1032
+ if (!cacheItem) {
1033
+ cacheItem = super.getConnectedAttributesByDisplayForm(ref).catch((e) => {
1034
+ if (idCacheKey) {
1035
+ cache.delete(idCacheKey);
1036
+ }
1037
+ if (uriCacheKey) {
1038
+ cache.delete(uriCacheKey);
1039
+ }
1040
+ throw e;
1041
+ });
1042
+ if (idCacheKey) {
1043
+ cache.set(idCacheKey, cacheItem);
1044
+ }
1045
+ if (uriCacheKey) {
1046
+ cache.set(uriCacheKey, cacheItem);
1047
+ }
1048
+ }
1049
+ return cacheItem;
1050
+ };
859
1051
  getAttributeDatasetMeta = async (ref) => {
860
1052
  const cache = getOrCreateAttributeCache(this.ctx, this.workspace).dataSetsMeta;
861
1053
  const idCacheKey = isIdentifierRef(ref) ? ref.identifier : undefined;
@@ -1423,6 +1615,124 @@ function cachedMeasures(ctx) {
1423
1615
  return (original, workspace) => new WithMeasuresCaching(original, ctx, workspace);
1424
1616
  }
1425
1617
  //
1618
+ // Datasets caching
1619
+ //
1620
+ function getOrCreateDatasetsCache(ctx, workspace) {
1621
+ const cache = ctx.caches.workspaceDatasets;
1622
+ let cacheEntry = cache.get(workspace);
1623
+ if (!cacheEntry) {
1624
+ cacheEntry = {
1625
+ datasets: new LRUCache({
1626
+ max: ctx.config.maxDatasetsPerWorkspace,
1627
+ }),
1628
+ };
1629
+ cache.set(workspace, cacheEntry);
1630
+ }
1631
+ return cacheEntry;
1632
+ }
1633
+ class WithDatasetsCaching extends DecoratedWorkspaceDatasetsService {
1634
+ ctx;
1635
+ workspace;
1636
+ constructor(decorated, ctx, workspace) {
1637
+ super(decorated);
1638
+ this.ctx = ctx;
1639
+ this.workspace = workspace;
1640
+ }
1641
+ // Pattern 1: scalar read keyed by ref identifier/uri (mirrors getAttributeByDisplayForm).
1642
+ getDataset = (ref) => {
1643
+ const cache = getOrCreateDatasetsCache(this.ctx, this.workspace).datasets;
1644
+ const idCacheKey = isIdentifierRef(ref) ? ref.identifier : undefined;
1645
+ const uriCacheKey = isUriRef(ref) ? ref.uri : undefined;
1646
+ let cacheItem = firstDefined([idCacheKey, uriCacheKey].map((key) => key && cache.get(key)));
1647
+ if (!cacheItem) {
1648
+ cacheItem = super.getDataset(ref).catch((e) => {
1649
+ if (idCacheKey) {
1650
+ cache.delete(idCacheKey);
1651
+ }
1652
+ if (uriCacheKey) {
1653
+ cache.delete(uriCacheKey);
1654
+ }
1655
+ throw e;
1656
+ });
1657
+ if (idCacheKey) {
1658
+ cache.set(idCacheKey, cacheItem);
1659
+ }
1660
+ if (uriCacheKey) {
1661
+ cache.set(uriCacheKey, cacheItem);
1662
+ }
1663
+ }
1664
+ return cacheItem;
1665
+ };
1666
+ // Pattern 2 (the pilot): bulk read that de-duplicates in-flight requests. A single underlying
1667
+ // load promise is issued for the missing refs and the per-ref promises derived from it are
1668
+ // registered in the cache synchronously, before awaiting, so concurrent callers share them.
1669
+ getDataSets = async (refs) => {
1670
+ const cache = getOrCreateDatasetsCache(this.ctx, this.workspace).datasets;
1671
+ // Grab references to the cache results as soon as possible in case they would get evicted
1672
+ // while loading the ones missing from the cache.
1673
+ const entries = refs.map((ref) => {
1674
+ const idCacheKey = isIdentifierRef(ref) ? ref.identifier : undefined;
1675
+ const uriCacheKey = isUriRef(ref) ? ref.uri : undefined;
1676
+ const cacheHit = firstDefined([idCacheKey, uriCacheKey].map((key) => key && cache.get(key)));
1677
+ return {
1678
+ ref,
1679
+ idCacheKey,
1680
+ uriCacheKey,
1681
+ promise: cacheHit,
1682
+ };
1683
+ });
1684
+ const missing = entries.filter((entry) => !entry.promise);
1685
+ if (missing.length > 0) {
1686
+ // Single underlying request shared by every missing ref.
1687
+ const loadPromise = this.decorated.getDataSets(missing.map((entry) => entry.ref));
1688
+ // Attach a no-op handler so the shared promise never produces an unhandled rejection;
1689
+ // the per-ref promises below carry the real error handling.
1690
+ loadPromise.catch(() => undefined);
1691
+ missing.forEach((entry) => {
1692
+ const perRefPromise = loadPromise.then((loaded) => {
1693
+ const match = loaded.find((dataSet) => refMatchesMdObject(entry.ref, dataSet, "dataSet"));
1694
+ // The backend may omit refs it could not resolve (inconsistent relations).
1695
+ // Evict the omitted ref so it is not cached and gets reloaded next time.
1696
+ if (!match) {
1697
+ if (entry.idCacheKey) {
1698
+ cache.delete(entry.idCacheKey);
1699
+ }
1700
+ if (entry.uriCacheKey) {
1701
+ cache.delete(entry.uriCacheKey);
1702
+ }
1703
+ }
1704
+ return match;
1705
+ });
1706
+ // Evict on error so a rejected promise is never left cached.
1707
+ const guarded = perRefPromise.catch((e) => {
1708
+ if (entry.idCacheKey) {
1709
+ cache.delete(entry.idCacheKey);
1710
+ }
1711
+ if (entry.uriCacheKey) {
1712
+ cache.delete(entry.uriCacheKey);
1713
+ }
1714
+ throw e;
1715
+ });
1716
+ if (entry.idCacheKey) {
1717
+ cache.set(entry.idCacheKey, guarded);
1718
+ }
1719
+ if (entry.uriCacheKey) {
1720
+ cache.set(entry.uriCacheKey, guarded);
1721
+ }
1722
+ entry.promise = guarded;
1723
+ });
1724
+ }
1725
+ // Derive the output from what actually resolved, preserving the input ordering and
1726
+ // dropping refs that the backend omitted. Omitted refs resolve to `undefined` (see the
1727
+ // `match` lookup above), so genuine backend rejections still propagate and are not masked.
1728
+ const resolved = await Promise.all(entries.map((entry) => entry.promise));
1729
+ return resolved.filter((dataSet) => dataSet !== undefined);
1730
+ };
1731
+ }
1732
+ function cachedDatasets(ctx) {
1733
+ return (original, workspace) => new WithDatasetsCaching(original, ctx, workspace);
1734
+ }
1735
+ //
1426
1736
  // ORGANIZATION EXPORT TEMPLATES CACHING
1427
1737
  //
1428
1738
  class WithOrganizationExportTemplatesCaching extends DecoratedOrganizationExportTemplatesService {
@@ -1664,6 +1974,9 @@ function cacheControl(ctx) {
1664
1974
  resetFacts: () => {
1665
1975
  ctx.caches.workspaceFacts?.clear();
1666
1976
  },
1977
+ resetDatasets: () => {
1978
+ ctx.caches.workspaceDatasets?.clear();
1979
+ },
1667
1980
  resetWorkspaceSettings: () => {
1668
1981
  ctx.caches.workspaceSettings?.clear();
1669
1982
  },
@@ -1689,6 +2002,7 @@ function cacheControl(ctx) {
1689
2002
  control.resetSecuritySettings();
1690
2003
  control.resetAttributes();
1691
2004
  control.resetFacts();
2005
+ control.resetDatasets();
1692
2006
  control.resetWorkspaceSettings();
1693
2007
  control.resetGeoStyles();
1694
2008
  control.resetExportTemplates();
@@ -1721,6 +2035,8 @@ export const RecommendedCachingConfiguration = {
1721
2035
  maxAttributeWorkspaces: 1,
1722
2036
  maxAttributeDisplayFormsPerWorkspace: 500,
1723
2037
  maxAttributesPerWorkspace: 500,
2038
+ maxCommonAttributesPerWorkspace: 500,
2039
+ maxConnectedAttributesPerWorkspace: 500,
1724
2040
  maxAttributeElementResultsPerWorkspace: 100,
1725
2041
  maxWorkspaceSettings: 1,
1726
2042
  maxAutomationsWorkspaces: 1,
@@ -1729,6 +2045,8 @@ export const RecommendedCachingConfiguration = {
1729
2045
  maxFactsPerWorkspace: 500,
1730
2046
  maxMeasuresWorkspaces: 1,
1731
2047
  maxMeasuresPerWorkspace: 100,
2048
+ maxDatasetWorkspaces: 1,
2049
+ maxDatasetsPerWorkspace: 500,
1732
2050
  maxExportTemplatesOrgs: 1,
1733
2051
  maxExportTemplatesWorkspaces: 1,
1734
2052
  cacheGeoStyles: true,
@@ -1758,6 +2076,7 @@ export function withCaching(realBackend, config) {
1758
2076
  const insightsCaching = cachingEnabled(config.maxInsightsPerWorkspace);
1759
2077
  const factsCaching = cachingEnabled(config.maxFactsWorkspaces);
1760
2078
  const measuresCaching = cachingEnabled(config.maxMeasuresWorkspaces);
2079
+ const datasetsCaching = cachingEnabled(config.maxDatasetWorkspaces);
1761
2080
  // Backward compatibility: `maxExportTemplatesWorkspaces` used to be the (deprecated) alias that
1762
2081
  // sized the org export-templates cache. It now primarily drives workspace caching, but callers
1763
2082
  // that only set the old name must keep getting org caching until the alias is removed.
@@ -1792,6 +2111,9 @@ export function withCaching(realBackend, config) {
1792
2111
  workspaceMeasures: measuresCaching
1793
2112
  ? new LRUCache({ max: config.maxMeasuresWorkspaces })
1794
2113
  : undefined,
2114
+ workspaceDatasets: datasetsCaching
2115
+ ? new LRUCache({ max: config.maxDatasetWorkspaces })
2116
+ : undefined,
1795
2117
  organizationExportTemplates: exportTemplatesCaching
1796
2118
  ? new LRUCache({ max: orgExportTemplatesMax })
1797
2119
  : undefined,
@@ -1816,6 +2138,7 @@ export function withCaching(realBackend, config) {
1816
2138
  const insights = insightsCaching ? cachedInsights(ctx) : (v) => v;
1817
2139
  const facts = factsCaching ? cachedFacts(ctx) : (v) => v;
1818
2140
  const measures = measuresCaching ? cachedMeasures(ctx) : (v) => v;
2141
+ const datasets = datasetsCaching ? cachedDatasets(ctx) : (v) => v;
1819
2142
  const organizationExportTemplates = exportTemplatesCaching
1820
2143
  ? cachedOrganizationExportTemplates(ctx)
1821
2144
  : undefined;
@@ -1837,6 +2160,7 @@ export function withCaching(realBackend, config) {
1837
2160
  insights,
1838
2161
  facts,
1839
2162
  measures,
2163
+ datasets,
1840
2164
  organizationExportTemplates,
1841
2165
  workspaceExportTemplates,
1842
2166
  geo,
@@ -1 +1 @@
1
- {"version":3,"file":"analyticalWorkspace.d.ts","sourceRoot":"","sources":["../../src/decoratedBackend/analyticalWorkspace.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,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,CAEjD;IAEM,KAAK,IAAI,oBAAoB,CAEnC;IAEM,iBAAiB,IAAI,uBAAuB,CAElD;IAEM,UAAU,IAAI,yBAAyB,CAE7C;IAEM,aAAa,IAAI,8BAA8B,CAErD;IAEM,iBAAiB,IAAI,kCAAkC,CAE7D;IAEM,oBAAoB,IAAI,4BAA4B,CAE1D;IAEM,MAAM,IAAI,uBAAuB,CAEvC;IAEM,iBAAiB,IAAI,kCAAkC,CAE7D;IAEM,WAAW,IAAI,mBAAmB,CAExC;IAEM,YAAY,IAAI,6BAA6B,CAEnD;IAEM,WAAW,IAAI,2BAA2B,CAQhD;IAEM,KAAK,IAAI,aAAa,CAE5B;IAEM,UAAU,IAAI,kBAAkB,CAEtC;IAEM,eAAe,IAAI,gCAAgC,CAQzD;CACJ"}
@@ -83,6 +83,10 @@ export class AnalyticalWorkspaceDecorator {
83
83
  return this.decorated.styling();
84
84
  }
85
85
  datasets() {
86
+ const { datasets } = this.factories;
87
+ if (datasets) {
88
+ return datasets(this.decorated.datasets(), this.workspace);
89
+ }
86
90
  return this.decorated.datasets();
87
91
  }
88
92
  permissions() {
@@ -0,0 +1,16 @@
1
+ import { type IDatasetsQuery, type IWorkspaceDatasetsService } from "@gooddata/sdk-backend-spi";
2
+ import { type IDataSetMetadataObject, type IDataset, type IMetadataObject, type IMetadataObjectBase, type IMetadataObjectIdentity, type ObjRef } from "@gooddata/sdk-model";
3
+ /**
4
+ * @alpha
5
+ */
6
+ export declare abstract class DecoratedWorkspaceDatasetsService implements IWorkspaceDatasetsService {
7
+ protected readonly decorated: IWorkspaceDatasetsService;
8
+ protected constructor(decorated: IWorkspaceDatasetsService);
9
+ getDatasets(): Promise<IDataset[]>;
10
+ getAllDatasetsMeta(): Promise<IMetadataObject[]>;
11
+ getDataSets(refs: ObjRef[]): Promise<IDataSetMetadataObject[]>;
12
+ getDataset(ref: ObjRef): Promise<IDataSetMetadataObject>;
13
+ updateDatasetMeta(dataSet: Partial<IMetadataObjectBase> & IMetadataObjectIdentity): Promise<IDataSetMetadataObject>;
14
+ getDatasetsQuery(): IDatasetsQuery;
15
+ }
16
+ //# sourceMappingURL=datasets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../src/decoratedBackend/datasets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAChG,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,MAAM,EACd,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,8BAAsB,iCAAkC,YAAW,yBAAyB;IAClE,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,yBAAyB;IAA7E,SAAS,aAAgC,SAAS,EAAE,yBAAyB,EAAI;IAE1E,WAAW,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAExC;IAEM,kBAAkB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAEtD;IAEM,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAEpE;IAEM,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAE9D;IAEM,iBAAiB,CACpB,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,GAChE,OAAO,CAAC,sBAAsB,CAAC,CAEjC;IAEM,gBAAgB,IAAI,cAAc,CAExC;CACJ"}
@@ -0,0 +1,28 @@
1
+ // (C) 2025-2026 GoodData Corporation
2
+ /**
3
+ * @alpha
4
+ */
5
+ export class DecoratedWorkspaceDatasetsService {
6
+ decorated;
7
+ constructor(decorated) {
8
+ this.decorated = decorated;
9
+ }
10
+ getDatasets() {
11
+ return this.decorated.getDatasets();
12
+ }
13
+ getAllDatasetsMeta() {
14
+ return this.decorated.getAllDatasetsMeta();
15
+ }
16
+ getDataSets(refs) {
17
+ return this.decorated.getDataSets(refs);
18
+ }
19
+ getDataset(ref) {
20
+ return this.decorated.getDataset(ref);
21
+ }
22
+ updateDatasetMeta(dataSet) {
23
+ return this.decorated.updateDatasetMeta(dataSet);
24
+ }
25
+ getDatasetsQuery() {
26
+ return this.decorated.getDatasetsQuery();
27
+ }
28
+ }
@@ -1,4 +1,4 @@
1
- import { type IExecutionFactory, type IGeoService, type IOrganizationExportTemplatesService, type ISecuritySettingsService, type IWorkspaceAttributesService, type IWorkspaceAutomationService, type IWorkspaceCatalogFactory, type IWorkspaceDashboardsService, type IWorkspaceExportTemplatesService, type IWorkspaceFactsService, type IWorkspaceInsightsService, type IWorkspaceMeasuresService, type IWorkspaceSettingsService } from "@gooddata/sdk-backend-spi";
1
+ import { type IExecutionFactory, type IGeoService, type IOrganizationExportTemplatesService, type ISecuritySettingsService, type IWorkspaceAttributesService, type IWorkspaceAutomationService, type IWorkspaceCatalogFactory, type IWorkspaceDashboardsService, type IWorkspaceDatasetsService, type IWorkspaceExportTemplatesService, type IWorkspaceFactsService, type IWorkspaceInsightsService, type IWorkspaceMeasuresService, type IWorkspaceSettingsService } from "@gooddata/sdk-backend-spi";
2
2
  /**
3
3
  * @alpha
4
4
  */
@@ -27,6 +27,10 @@ export type AutomationsDecoratorFactory = (automations: IWorkspaceAutomationServ
27
27
  * @alpha
28
28
  */
29
29
  export type MeasuresDecoratorFactory = (measures: IWorkspaceMeasuresService, workspace: string) => IWorkspaceMeasuresService;
30
+ /**
31
+ * @alpha
32
+ */
33
+ export type DatasetsDecoratorFactory = (datasets: IWorkspaceDatasetsService, workspace: string) => IWorkspaceDatasetsService;
30
34
  /**
31
35
  * @alpha
32
36
  */
@@ -67,6 +71,7 @@ export type DecoratorFactories = {
67
71
  automations?: AutomationsDecoratorFactory;
68
72
  insights?: InsightsDecoratorFactory;
69
73
  measures?: MeasuresDecoratorFactory;
74
+ datasets?: DatasetsDecoratorFactory;
70
75
  dashboards?: DashboardsDecoratorFactory;
71
76
  facts?: FactsDecoratorFactory;
72
77
  geo?: GeoDecoratorFactory;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/decoratedBackend/types.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EACjC,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,gBAAgB,EAAE,iBAAiB,KAAK,iBAAiB,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,wBAAwB,KAAK,wBAAwB,CAAC;AAEtG;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAC3C,gBAAgB,EAAE,wBAAwB,KACzC,wBAAwB,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,CAC5C,QAAQ,EAAE,yBAAyB,EACnC,SAAS,EAAE,MAAM,KAChB,yBAAyB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CACrC,UAAU,EAAE,2BAA2B,EACvC,SAAS,EAAE,MAAM,KAChB,2BAA2B,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACtC,WAAW,EAAE,2BAA2B,EACxC,SAAS,EAAE,MAAM,KAChB,2BAA2B,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACnC,QAAQ,EAAE,yBAAyB,EACnC,SAAS,EAAE,MAA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AAE,qBAAqB,CAAC;IAC9B,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B,2BAA2B,CAAC,EAAE,2CAA2C,CAAC;IAC1E,wBAAwB,CAAC,EAAE,wCAAwC,CAAC;CACvE,CAAC"}
package/esm/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export { type DummyBackendConfig, dummyBackend, dummyBackendEmptyData, dummyData
12
12
  export { DummySemanticSearchQueryBuilder } from "./dummyBackend/DummySemanticSearch.js";
13
13
  export { DummyGenAIChatThread, DummyChatConversations } from "./dummyBackend/DummyGenAIChatThread.js";
14
14
  export { decoratedBackend } from "./decoratedBackend/index.js";
15
- export type { DecoratorFactories, CatalogDecoratorFactory, ExecutionDecoratorFactory, SecuritySettingsDecoratorFactory, WorkspaceSettingsDecoratorFactory, AutomationsDecoratorFactory, AttributesDecoratorFactory, InsightsDecoratorFactory, MeasuresDecoratorFactory, DashboardsDecoratorFactory, FactsDecoratorFactory, GeoDecoratorFactory, OrganizationExportTemplatesDecoratorFactory, WorkspaceExportTemplatesDecoratorFactory, } from "./decoratedBackend/types.js";
15
+ export type { DecoratorFactories, CatalogDecoratorFactory, ExecutionDecoratorFactory, SecuritySettingsDecoratorFactory, WorkspaceSettingsDecoratorFactory, AutomationsDecoratorFactory, AttributesDecoratorFactory, InsightsDecoratorFactory, MeasuresDecoratorFactory, DatasetsDecoratorFactory, DashboardsDecoratorFactory, FactsDecoratorFactory, GeoDecoratorFactory, OrganizationExportTemplatesDecoratorFactory, WorkspaceExportTemplatesDecoratorFactory, } from "./decoratedBackend/types.js";
16
16
  export { type PreparedExecutionWrapper, DecoratedExecutionFactory, DecoratedPreparedExecution, DecoratedExecutionResult, } from "./decoratedBackend/execution.js";
17
17
  export { DecoratedWorkspaceDashboardsService } from "./decoratedBackend/dashboards.js";
18
18
  export { DecoratedWorkspaceInsightsService } from "./decoratedBackend/insights.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"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AAO,EAAE,KAAK,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAC1G,OAAO,EACH,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACH,yBAAyB,EACzB,6BAA6B,GAChC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACH,0BAA0B,EAC1B,8BAA8B,GACjC,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC"}
@@ -167,6 +167,7 @@ import { IWorkspaceCatalogAvailableItemsFactory } from '@gooddata/sdk-backend-sp
167
167
  import { IWorkspaceCatalogFactory } from '@gooddata/sdk-backend-spi';
168
168
  import { IWorkspaceCatalogFactoryOptions } from '@gooddata/sdk-backend-spi';
169
169
  import { IWorkspaceDashboardsService } from '@gooddata/sdk-backend-spi';
170
+ import { IWorkspaceDatasetsService } from '@gooddata/sdk-backend-spi';
170
171
  import { IWorkspaceExportTemplatesService } from '@gooddata/sdk-backend-spi';
171
172
  import { IWorkspaceFactsService } from '@gooddata/sdk-backend-spi';
172
173
  import { IWorkspaceInsightsService } from '@gooddata/sdk-backend-spi';
@@ -461,6 +462,10 @@ export declare type CacheControl = {
461
462
  * Resets all workspace facts caches.
462
463
  */
463
464
  resetFacts: () => void;
465
+ /**
466
+ * Resets all workspace dataset caches.
467
+ */
468
+ resetDatasets: () => void;
464
469
  /**
465
470
  * Resets all workspace settings caches.
466
471
  */
@@ -718,6 +723,33 @@ export declare type CachingConfiguration = {
718
723
  * tweak the `maxMeasuresWorkspaces` value.
719
724
  */
720
725
  maxMeasuresPerWorkspace?: number;
726
+ /**
727
+ * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceDatasetsService} calls.
728
+ * The workspace identifier is used as cache key.
729
+ * For each workspace, there will be a cache entry holding `maxDatasetsPerWorkspace` entries for dataset metadata reads.
730
+ *
731
+ * When limit is reached, cache entries will be evicted using LRU policy.
732
+ *
733
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded
734
+ * cache may be OK in applications where number of workspaces is small - the cache will be limited
735
+ * naturally and will not grow uncontrollably.
736
+ *
737
+ * When non-positive number is specified, then no caching will be done.
738
+ */
739
+ maxDatasetWorkspaces?: number;
740
+ /**
741
+ * Maximum number of datasets to cache per workspace.
742
+ *
743
+ * When limit is reached, cache entries will be evicted using LRU policy.
744
+ *
745
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded
746
+ * dataset cache may be OK in applications where number of datasets is small and/or they are requested
747
+ * infrequently - the cache will be limited naturally and will not grow uncontrollably.
748
+ *
749
+ * Setting non-positive number here is invalid. If you want to turn off dataset caching,
750
+ * tweak the `maxDatasetWorkspaces` value.
751
+ */
752
+ maxDatasetsPerWorkspace?: number;
721
753
  /**
722
754
  * Maximum number of organizations for which to cache organization-level export templates.
723
755
  * Organization export templates are organization-level, so typically a single entry suffices.
@@ -763,6 +795,34 @@ export declare type CachingConfiguration = {
763
795
  * tweak the `maxAttributeWorkspaces` value.
764
796
  */
765
797
  maxAttributesPerWorkspace?: number;
798
+ /**
799
+ * Maximum number of common attribute results to cache per workspace.
800
+ *
801
+ * This bounds the cache used by `getCommonAttributes` and `getCommonAttributesBatch`, keyed by the
802
+ * (order-independent) set of input attribute references.
803
+ *
804
+ * When limit is reached, cache entries will be evicted using LRU policy.
805
+ *
806
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen.
807
+ *
808
+ * Setting non-positive number here is invalid. If you want to turn off common attribute caching,
809
+ * tweak the `maxAttributeWorkspaces` value.
810
+ */
811
+ maxCommonAttributesPerWorkspace?: number;
812
+ /**
813
+ * Maximum number of connected attribute results to cache per workspace.
814
+ *
815
+ * This bounds the cache used by `getConnectedAttributesByDisplayForm`, keyed by the display form
816
+ * reference identifier/uri.
817
+ *
818
+ * When limit is reached, cache entries will be evicted using LRU policy.
819
+ *
820
+ * When no maximum number is specified, the cache will be unbounded and no evictions will happen.
821
+ *
822
+ * Setting non-positive number here is invalid. If you want to turn off connected attribute caching,
823
+ * tweak the `maxAttributeWorkspaces` value.
824
+ */
825
+ maxConnectedAttributesPerWorkspace?: number;
766
826
  /**
767
827
  * Maximum number of attribute element results to cache per workspace.
768
828
  *
@@ -1065,6 +1125,11 @@ export declare type DataProviderContext = CustomCallContext & {
1065
1125
  export declare class DataSetMetadataObjectBuilder<T extends IDataSetMetadataObject = IDataSetMetadataObject> extends MetadataObjectBuilder<T> {
1066
1126
  }
1067
1127
 
1128
+ /**
1129
+ * @alpha
1130
+ */
1131
+ export declare type DatasetsDecoratorFactory = (datasets: IWorkspaceDatasetsService, workspace: string) => IWorkspaceDatasetsService;
1132
+
1068
1133
  /**
1069
1134
  * Decorated backend is a wrapper of any other backend implementations that can be used to enrich
1070
1135
  * functionality of the services that the wrapped backend normally provides.
@@ -1408,6 +1473,7 @@ export declare type DecoratorFactories = {
1408
1473
  automations?: AutomationsDecoratorFactory;
1409
1474
  insights?: InsightsDecoratorFactory;
1410
1475
  measures?: MeasuresDecoratorFactory;
1476
+ datasets?: DatasetsDecoratorFactory;
1411
1477
  dashboards?: DashboardsDecoratorFactory;
1412
1478
  facts?: FactsDecoratorFactory;
1413
1479
  geo?: GeoDecoratorFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-base",
3
- "version": "11.48.0",
3
+ "version": "11.49.0-alpha.1",
4
4
  "description": "GoodData.UI SDK - Base for backend implementations",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -29,9 +29,9 @@
29
29
  "ts-invariant": "0.10.3",
30
30
  "tslib": "2.8.1",
31
31
  "uuid": "11.1.1",
32
- "@gooddata/sdk-backend-spi": "11.48.0",
33
- "@gooddata/util": "11.48.0",
34
- "@gooddata/sdk-model": "11.48.0"
32
+ "@gooddata/sdk-model": "11.49.0-alpha.1",
33
+ "@gooddata/util": "11.49.0-alpha.1",
34
+ "@gooddata/sdk-backend-spi": "11.49.0-alpha.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@microsoft/api-documenter": "^7.17.0",
@@ -56,9 +56,9 @@
56
56
  "oxlint-tsgolint": "0.15.0",
57
57
  "typescript": "5.9.3",
58
58
  "vitest": "4.1.8",
59
- "@gooddata/eslint-config": "11.48.0",
60
- "@gooddata/oxlint-config": "11.48.0",
61
- "@gooddata/reference-workspace": "11.48.0"
59
+ "@gooddata/eslint-config": "11.49.0-alpha.1",
60
+ "@gooddata/oxlint-config": "11.49.0-alpha.1",
61
+ "@gooddata/reference-workspace": "11.49.0-alpha.1"
62
62
  },
63
63
  "scripts": {
64
64
  "_phase:build": "npm run build",