Problem
Some tools read and rewrite their own cache on every run. Vitest does this with results.json and its module cache. Under vp run the task then reads a file it also writes, so it's never cached ("not cached because it modified its inputs").
@voidzero-dev/vite-task-client can fix this with ignoreInput, but that asks every tool to depend on a runner-specific package. Vite+ also hardcodes an exclude for Vitest's results.json, which only covers vp test.
Proposal
Honor the Cache Directory Tagging spec. A directory containing a CACHEDIR.TAG that starts with Signature: 8a477f597d28d172789f06886806bc55 is a cache, so reads inside it aren't automatic inputs. Writes there would still be outputs and get restored on a cache hit.
Tools can then mark their caches without knowing about any runner. Cargo already tags target/, and backup tools like restic and borg skip tagged directories.
Problem
Some tools read and rewrite their own cache on every run. Vitest does this with
results.jsonand its module cache. Undervp runthe task then reads a file it also writes, so it's never cached ("not cached because it modified its inputs").@voidzero-dev/vite-task-clientcan fix this withignoreInput, but that asks every tool to depend on a runner-specific package. Vite+ also hardcodes an exclude for Vitest'sresults.json, which only coversvp test.Proposal
Honor the Cache Directory Tagging spec. A directory containing a
CACHEDIR.TAGthat starts withSignature: 8a477f597d28d172789f06886806bc55is a cache, so reads inside it aren't automatic inputs. Writes there would still be outputs and get restored on a cache hit.Tools can then mark their caches without knowing about any runner. Cargo already tags
target/, and backup tools like restic and borg skip tagged directories.