How do you use a remote build cache (Gradle, Bazel, Turborepo, Nx)?
AdvancedProductionMetrics, Performance and Cost
Answer
A remote cache stores task outputs keyed by a hash of inputs, so any machine can reuse results computed elsewhere. CI populates it (read-write on main), developers and PR jobs read from it (read-only for untrusted PRs to avoid cache poisoning). For Gradle, enable --build-cache with an HTTP cache node; for Bazel, --remote_cache=grpcs://...; Nx/Turborepo use cloud or self-hosted caches. Hit rates of 70%+ commonly cut CI time by more than half in monorepos, but correctness depends on hermetic, deterministic tasks.
./gradlew build --build-cache
bazel build //... --remote_cache=grpcs://cache.example.com --remote_upload_local_results=false
More on Metrics, Performance and Cost
How do you measure DORA metrics in practice?IntermediateWhat do the DORA performance levels look like, and how do you use them?IntermediateWhat are common ways DORA metrics get gamed or misread?AdvancedWhich pipeline metrics do you monitor for the CI platform itself?IntermediateHow do you cut CI cost without hurting developer speed?IntermediateHow do you detect and manage flaky tests at scale?Advanced