Skip to content

Workspace source and cache ​

WORKSPACE identifies the JSON document loaded by the XYZ workspace cache. processEnv.js copies environment values into xyzEnv; it does not supply a default WORKSPACE source. Configure it using the environment setup described in local development.

The source prefix selects a provider. The current provider registry includes file:, https: and cloudfront:, plus signer providers derived from SIGN_* keys. There is no built-in http: provider.

dotenv
WORKSPACE=file:/public/workspace.json
WORKSPACE_AGE=3600000

public/workspace.json is the minimal workspace in the repository, used by local development. Local file paths are resolved relative to xyzEnv.XYZ_CWD, which processEnv.js sets to the XYZ_CWD variable or the repository root. A workspace describes default and named locales.

Cache behavior ​

WORKSPACE_AGE defaults to 3600000 milliseconds, one hour. The cache compares elapsed time against its numeric value when checked. A value of 0 expires the cache on every check; the string '0' survives the environment defaulting step. The force argument to checkWorkspaceCache also triggers a rebuild.

Rebuilding clears the provider source cache before fetching the workspace. A failed fetch resets the cached promise so a later call can retry. Consult the cache implementation and tests before altering this behavior. Keep credentials out of workspace examples and source URLs.

XYZ v5.1.0. Generated from knowledge/ at dd7a6fa27736502733499c1bf485f15659b10338. Concepts marked draft are not reviewed.