MCPcopy Create free account
hub / github.com/bytebase/bytebase / getWorkspaceCacheScope

Function getWorkspaceCacheScope

frontend/src/react/stores/app/utils.ts:33–38  ·  view source on GitHub ↗
(
  get: () => AppStoreState,
  workspaceName = get().currentUser?.workspace ?? ""
)

Source from the content-addressed store, hash-verified

31// Workspace segment for localStorage cache keys — "" for self-host (keys stay
32// shared/unchanged), the workspace name for SaaS (keys are workspace-isolated).
33export function getWorkspaceCacheScope(
34 get: () => AppStoreState,
35 workspaceName = get().currentUser?.workspace ?? ""
36): string {
37 return workspaceCacheScope(get().isSaaSMode(), workspaceName);
38}
39
40export function readJson<T>(key: string, fallback: T): T {
41 try {

Callers 1

createPreferencesSliceFunction · 0.90

Calls 2

workspaceCacheScopeFunction · 0.90
getFunction · 0.85

Tested by

no test coverage detected