Skip to content

Commit 6d78114

Browse files
committed
docs(documentation): Outline cache parameter options
1 parent 05c41e3 commit 6d78114

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

rfcs/0017-incremental-build.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ In addition, tasks may also implement the following new methods:
128128
* `options`: Same as for the main task function. `{projectName, projectNamespace, configuration, taskName}`
129129
* Returns: `undefined` or an arbitrary string representing the build signature for the task. This can be used to incorporate task-specific configuration files (e.g. tsconfig.json for a TypeScript compilation task) into the build signature of the project, causing the cache to be invalidated if those files change. The string shouldn't be a hash value (the build signature hash is calculated later on). If `undefined` is returned, or if the method is not implemented, it is assumed that the task's cache remains valid until relevant input-resources change.
130130
* This method is called once at the beginning of every build. The return value used to calculate a unique signature for the task based on its configuration. This signature is then incorporated into the overall build signature of the project (see [Cache Creation](#cache-creation) below).
131+
* Might return a list of file paths that shall be watched for changes (when running in watch mode). On change, the build signature is recalculated and the cache invalidated if it has changed.
131132
* **async determineExpectedOutput({workspace, dependencies, cacheUtil, log, options})**:
132133
* `workspace`: Reader to access resources of the project's workspace (read only)
133134
* `dependencies`: Reader to access resources of the project's dependencies
@@ -463,10 +464,15 @@ For this purpose, a script is to be injected into the served HTML pages that est
463464

464465
The following new arguments shall be added to the `ui5 build` and `ui5 serve` commands:
465466

466-
* `--no-cache`: Disables the use of the build cache entirely. The project will be built from scratch without leveraging any cached results.
467-
* **To be discussed:** This clashes with the currently existing [`--cache-mode` parameter](https://ui5.github.io/cli/stable/pages/CLI/#ui5-build). Should that one be renamed or repurposed?
467+
* `--cache-mode`: Disables the use of the build cache entirely. The project will be built from scratch without leveraging any cached results.
468+
* Possible modes:
469+
* Default: Use the cache if available
470+
* Force: Always use the cache. If it is incomplete or invalid, fail the build
471+
* Read-only: Do not create or update the cache but make use of any existing cache if available (useful for CI/CD)
472+
* Off: Do not use the cache at all
473+
* **To be discussed:** This clashes with the already existing [`--cache-mode` parameter](https://ui5.github.io/cli/stable/pages/CLI/#ui5-build). Should that one be renamed or repurposed?
468474
* `--watch`: Enables watch mode, causing the build to be re-triggered whenever a source file or relevant configuration file changes.
469-
* This parameter is only relevant for the `ui5 build` command. The `ui5 serve` command shall always use watch mode.
475+
* This parameter is only relevant for the `ui5 build` command. The `ui5 serve` command shall always use the watch mode internally.
470476

471477
## How we teach this
472478

0 commit comments

Comments
 (0)