You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add --cache/--no-cache CLI flags to vp run (#196)
## Summary
Adds `--cache` and `--no-cache` CLI flags to `vp run` that override the global cache configuration:
- `--cache` forces caching on for all tasks and scripts (per-task `cache: false` is still respected)
- `--no-cache` forces all caching off
- The two flags are mutually exclusive
- Flags work in nested `vp run` commands within task scripts — a nested `vp run --no-cache inner` will disable caching for the inner execution regardless of the parent's config
## Examples
```bash
# Force caching off for this run
vp run build --no-cache
# Force caching on even if globally disabled
vp run test --cache
```
## Architectural change
Global cache resolution has been moved from task graph load time to the plan stage. The task graph now stores per-task cache config without applying the global kill switch, and the final cache decision is made at plan time where CLI overrides are available. This enables proper support for nested `vp run --cache/--no-cache`.
## Test plan
- [x] All existing plan snapshot tests pass with updated snapshots
- [x] All existing e2e snapshot tests pass
- [x] `cargo test -p vite_task_graph --lib` unit tests pass
- [x] `cargo clippy` clean on all modified crates
0 commit comments