UPDATED IN SEPTEMBER 2026

Shared build cache across developers and CI

One build cache serves everybody: an artifact computed once - on a developer's laptop or on a CI runner - is reused by every later build that needs it, instead of being recomputed per machine.

L2 · DELEGATEDWhat this level takes
MUSTNot met, not at this level
  • Build caching is implemented (dependency cache, compilation cache)
  • Parallel build steps are configured (test and lint run concurrently)
  • The build cache is shared between developers and CI rather than rebuilt per machine
SHOULDExpected in practice, not required
  • Cache hit rate exceeds 60%
  • Build time has improved by at least 30% compared to uncached baseline
EVIDENCEHow you would check
  • Build cache configuration (Gradle build cache, npm cache, Docker layer cache)
  • CI pipeline configuration showing parallel step execution
  • Dedicated runner or resource pool configuration

What It Is

One build cache serves everybody: an artifact computed once - on a developer's laptop or on a CI runner - is reused by every later build that needs it, instead of being recomputed per machine. The cache is content-addressed, network-accessible, and populated by whoever gets there first. A developer who compiles a module on Monday morning has, without intending to, made that module free for the rest of the team and for every CI run that touches the same commit.

The shift from a per-machine cache to a shared one is smaller in configuration than it is in consequence. Local caching already removes the second build on one machine; sharing removes the second build anywhere. The most valuable case is the one that never happens with local caches: CI, running on an ephemeral container that has never seen this repository, hits a warm cache because a developer or an earlier run already computed what it needs. The run that used to be structurally cold becomes structurally warm.

This is a build system capability and it stops at the build system's boundary. How many runners exist, how work is queued and who waits behind whom belong to the CI/CD Pipeline; a shared cache makes each run cheaper, not better scheduled. The two are frequently confused because both present as "CI is slow", and the diagnosis matters: a shared cache fixes redundant computation, and no amount of it fixes contention.

What makes the cache trustworthy is not the storage but the build tool. A shared cache is only safe if a cache key genuinely captures everything a step consumed - inputs, tool versions, flags, platform - which is why build systems with declared, hermetic actions can share caches across machines and ad-hoc build scripts cannot. A shared cache built on unreliable keys does not merely miss; it serves the wrong artifact to someone else, which is a far worse failure than a slow build.

Why It Matters

  • CI stops paying the cold-start penalty - the run on a fresh container reuses what a developer already computed, which is the single largest source of avoidable CI time in most codebases
  • Cost per build falls as team size rises - a shared cache turns more people building the same code from a multiplier on compute into a multiplier on hit rate
  • Agent iteration gets its floor lowered - agents verify constantly, and verification that reuses most of its work is what makes a fleet's feedback loop tolerable
  • Onboarding and branch switching stop being expensive - a new machine, a fresh clone or a jump to a long-lived branch pulls artifacts rather than recomputing them
  • Cache hit rate becomes a usable health metric - once it exists, a falling hit rate is an early and specific warning that something has become non-deterministic, long before anyone reports a slow build

Getting Started

  1. Confirm your build is reproducible before you share anything - Build the same commit twice on two different machines and compare outputs. Embedded timestamps, absolute paths, unpinned tool versions and undeclared inputs all produce artifacts that must not be shared. Fix these first: a shared cache amplifies non-determinism into cross-machine bugs.
  2. Stand up the cache backend your build tool already speaks - Gradle has a build cache node and Develocity, Bazel and other REAPI-compatible tools have remote cache services including self-hostable options, Turborepo has remote caching, sccache backs onto object storage. Use the native integration rather than building your own layer around it.
  3. Make CI a writer and developers readers, at least at first - The safest rollout has CI populating the cache and developers reading from it. It gives immediate local speedups, limits the blast radius of a bad entry to a controlled writer, and lets you watch hit rates before opening writes more widely.
  4. Converge developer and CI build configuration - Sharing only works when the two produce interchangeable artifacts. Pin toolchain versions, align flags, and remove environment-dependent behaviour. Any difference between how a laptop and a runner build is a difference that silently halves your hit rate.
  5. Instrument hit rate and treat it as a monitored signal - Track hit rate per build step, and alert when it drops. A step that suddenly stops hitting has usually gained an undeclared input - a generated file, an environment variable, a timestamp - and catching it the same week is the difference between a small fix and an archaeology project.
  6. Set retention and access rules deliberately - Decide how long entries live, how large the store may grow, and who may write. Cache write access is effectively the ability to influence other people's builds, so it belongs behind authentication and should be scoped, not handed out by default.
TIP

The measurement that proves the investment is a CI run on a fresh runner for a commit a developer has already built locally. If that run is dramatically faster than the same run before the shared cache existed, developer-to-CI sharing is genuinely working. If it is not, the two environments are producing different cache keys and that is the next thing to fix.

Common Pitfalls

Sharing a cache built on unreliable keys. If a build step reads a file it never declared, its cache key does not describe its behaviour, and a hit on another machine returns an artifact built from different inputs. The result is a wrong build that reproduces nowhere and is blamed on everything except the cache. Hermeticity is the precondition, not an optimisation to follow later.

Letting everyone write to the shared cache from day one. Open write access means any misconfigured machine can poison entries for the whole organisation, and finding the culprit afterwards is unpleasant. Start with a trusted writer, expand deliberately, and always require authentication.

Ignoring the network cost. A shared cache trades computation for transfer. For small artifacts this is overwhelmingly worthwhile; for multi-gigabyte outputs over a slow link it can be slower than rebuilding. Measure rather than assume, and consider a local mirror for offices or regions that are far from the store.

Configuring developers and CI differently and then blaming the cache. Different flags or toolchain versions produce different keys, so the two populations quietly maintain two disjoint caches and the headline benefit never materialises. Teams then conclude that shared caching does not work for them. Check key agreement explicitly before drawing conclusions.

Confusing this with a capacity fix. A shared cache reduces the work each run performs. If runs are waiting rather than working - queued behind a concurrency limit, a busy runner pool or a shared test fixture - the cache will not help, and the pipeline's orchestration is where the fix lives. Diagnose queue time and execution time separately.

How Different Roles See It

BobHEAD OF ENGINEERING

Bob's team enabled local build caching last quarter and developers noticed the difference immediately. CI did not improve at all, and Bob is being asked to explain why an investment that visibly worked on laptops produced nothing on the metric the leadership team actually watches.

Bob should recognise that this is exactly the expected outcome and the argument for the next step. CI runners are ephemeral, so a per-machine cache is always empty when they start; only a shared cache reaches them. The work to get there is mostly reproducibility - pinned toolchains, no embedded timestamps or absolute paths, declared inputs - plus a cache backend, and it is best scoped as a few weeks on the highest-cost part of the build rather than a whole-repository programme. Bob should ask for the result to be reported as one number he can repeat: the time for a CI run on a commit a developer has already built. He should also make sure someone owns the cache afterwards, because hit rate degrades silently and an unowned cache becomes an expensive store of misses.

SarahPRODUCTIVITY LEAD

Sarah has cold-build and warm-build numbers from her earlier work and can now show that CI is permanently in the cold case. What she does not yet have is a way to tell whether the shared cache, once introduced, is actually being used.

Sarah should adopt cache hit rate as a first-class productivity metric alongside build time, because it is the leading indicator and build time is the lagging one. Reported per build step, it tells her not just that things got faster but which parts are reusing work and which never do - and a step with a persistently low hit rate is a concrete, assignable piece of work rather than a general complaint. She should also track hit rate separately for developer builds and CI builds; a large gap between the two is the signature of divergent configuration and the most common reason shared caching underdelivers. Sarah should report the developer-hours recovered rather than the seconds saved, since the audience for the number is the one deciding whether to fund the next piece of build work.

VictorSTAFF ENGINEER - AI CHAMPION

Victor has agents running constantly, and each one triggers verification that reruns work another agent finished minutes earlier on a neighbouring branch. He can see the redundancy in the logs and it is the largest remaining drag on the fleet's throughput.

Victor should get the agents onto the shared cache and then make sure they stay on it. In practice that means the agent's build environment uses the same pinned toolchain and the same flags as CI, so its keys match rather than nearly match, and that the environment is configured to read from the cache from the first command rather than after a warm-up. He should verify it the way he would verify anything else: run two agents on changes that share most of their dependency graph and confirm the second one hits. Victor should also watch for agents defeating the cache by accident - adding a timestamp to a generated file, or introducing a build step that reads the environment - and put a hit-rate check in the pull request feedback so the agent finds out immediately, while it can still fix it, rather than three weeks later when someone notices the bill.

How This Guide Changed

What each edition changed in this guide, newest first.

  1. V1.6September 2026LATEST

    The shared build cache took this rung: an artifact computed once, on a laptop or on a runner, is reused by every later build that needs it rather than recomputed per machine. Dedicated runner pools and workload-specific capacity went to CI/CD Pipeline, which owns who runs where and behind whom. The guide also makes the safety condition explicit, because a shared cache is only trustworthy if a cache key genuinely captures everything a step consumed. Built on unreliable keys it does not merely miss, it serves the wrong artifact to somebody else.

  2. V1.0March 2026

    Arrived as the answer to the shared-queue problem: stop asking one pool to serve everything, and give different classes of work their own capacity. The launch version laid out a granularity ladder, from per-team pools down to mapping individual job types onto hardware profiles, so teams could dedicate in proportion to their pain rather than rebuilding CI wholesale.

Where does your team actually sit on this?

This guide describes one level of one area. Run the assessment to place your team across all 16 areas, see which gates you have passed, and get a report you can take to your stakeholders.

Start the assessment