From 7eeff606c694acd81723b0a4167c75965fc169f9 Mon Sep 17 00:00:00 2001 From: Eric Clemmons Date: Tue, 19 May 2026 13:31:45 -0500 Subject: [PATCH] docs: update task output caching guide --- docs/guide/cache.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/guide/cache.md b/docs/guide/cache.md index a0b2e08277..fd034e0249 100644 --- a/docs/guide/cache.md +++ b/docs/guide/cache.md @@ -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: ```