remote caching
Storing build outputs on a shared server so that any developer or CI machine with the same inputs can download the result instead of rebuilding.
A writable shared cache that is not access-controlled lets one compromised machine plant malicious build outputs for everyone.
In more detail
When a task’s input hash is found in the remote cache, the tool downloads the saved files and logs and marks the task done in seconds. Because anyone who can write to the cache can influence everyone’s builds, the cache must be protected with access tokens and should separate environments such as staging and production.
Related terms
- Turborepo — A build tool for JavaScript monorepos that runs package tasks in dependency order, in parallel, and skips work whose inputs have not changed.
- cache — A store of earlier answers kept close to where they are needed so they can be reused instead of fetched or computed again.
- hash — A short fixed-length fingerprint calculated from data, which changes completely if even one byte of the data changes.
- continuous integration — Automatically building and testing every change as soon as it is pushed, so problems are caught early.
Taught in
- Monorepo Architecture: Workspaces & Turborepo — Production Full-Stack Engineering
- Unified Build Pipelines: Caching & Dependency Graphs — Production Full-Stack Engineering