Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/guide/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ When a task runs successfully (exit code 0), its terminal output (stdout/stderr)
If everything matches, the cached output is replayed instantly, and the command does not run.

::: info
Currently, only terminal output is cached and replayed. Output files such as `dist/` are not cached. If you delete them, use `--no-cache` to force a re-run. Output file caching is planned for a future release.
By default, only terminal output is cached and replayed. To cache files produced by a task, configure [`output`](/config/run#output) globs. Matching files are archived after a successful run and restored on a cache hit.
:::

```ts [vite.config.ts]
tasks: {
build: {
command: 'vp build',
output: ['dist/**'],
},
}
```

When a cache miss occurs, Vite Task tells you exactly why:

```
Expand Down