From 3f564eee1c459d8e4cb2fb33bc1a3e0055199f5e Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Tue, 12 Nov 2024 12:54:59 -0700 Subject: [PATCH] Document --cache flag. --- docs/repo-docs/reference/run.mdx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/repo-docs/reference/run.mdx b/docs/repo-docs/reference/run.mdx index 7b71f34025351..315ecdbe29bb3 100644 --- a/docs/repo-docs/reference/run.mdx +++ b/docs/repo-docs/reference/run.mdx @@ -58,6 +58,34 @@ TURBO_SCM_HEAD=your-branch turbo run build --affected changed. +### `--cache ` + +Default: `local:rw,remote:rw` + +Specify caching sources for the run. Accepts a comma-separated list of options: + +- `local`: Use the local filesystem cache +- `remote`: Use the Remote Cache + +When an option is omitted, it is neither read nor written to. + +Each option must be followed by one of: + +- `rw`: Read and write +- `r`: Read only +- `w`: Write only + +```bash title="Terminal" +# Read and write to local cache, read only to Remote Cache +turbo run build --cache=local:rw,remote:r + +# Read-only to local cache, read write to Remote Cache +turbo run build --cache=local:r,remote:rw + +# Read and write to local cache, no Remote Cache activity +turbo run build --cache=local:rw +``` + ### `--cache-dir ` Default: `.turbo/cache`