Skip to content
Latchkey

What Is Task Graph Caching?

Task graph caching is a build-tool technique that hashes the inputs of each task in the dependency graph and stores its outputs under that hash. When a task's inputs are unchanged, the tool restores the cached output rather than executing the task again. Combined with a shared backend, results are reused across machines.

Why it matters

Modeling a build as a graph of cacheable tasks means only the tasks downstream of an actual change ever run, and everything else is a cache hit. This is the engine behind fast incremental monorepo builds. Sharing the cache across CI runners turns one runner's work into a free hit for the next, cutting build minutes.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →