Deno 2.9 task cache skips a 4-second build in 10 milliseconds
Deno 2.9 adds files, output and env fields to deno.json tasks for caching. A test showed a repeat run over 40 files drop from 3.9 seconds to 9.3 milliseconds, with deleted outputs restored from the cache. On a 3000-file tree, checking for changes cost 3–4 times more than running a trivial task.
- files, output and env fields enable task caching in deno.json
- Repeat run fell from 3.939s to 0.0093s, a 423x speedup
- Touching mtime without editing content keeps the cache valid
- Checking 3000 files costs 3–4x more than a trivial task run
Read next
Software