Basic build caching
Basic build caching stores the outputs of build steps and reuses them when the inputs haven't changed.
- ·Build caching is implemented (dependency cache, compilation cache)
- ·Parallel build steps are configured (test and lint run concurrently)
- ·Dedicated CI resources are allocated (not shared across all teams)
- ·Cache hit rate exceeds 60%
- ·Build time has improved by at least 30% compared to uncached baseline
Evidence
- ·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
Basic build caching stores the outputs of build steps and reuses them when the inputs haven't changed. Instead of recompiling a Java class that was compiled identically yesterday, the build system fetches the compiled output from cache. Instead of re-downloading npm packages that are pinned to the same versions, the package manager reuses its local copy. Caching operates at multiple layers: compiler output caching, dependency download caching, test result caching, and Docker layer caching.
At L2, build caching is typically local and single-layer: Gradle's local build cache, npm's node_modules cache, pip's wheel cache, or Maven's local repository. These are the "first optimization layer" - low effort to enable, immediate impact on warm builds, but limited effectiveness across machines or concurrent agents. A developer's local cache doesn't help a CI runner that starts fresh, and a cache in one worktree doesn't benefit another worktree running in parallel.
The most impactful caching wins at L2 are dependency caching in CI and task output caching for compilation. Dependency downloads are often a surprising fraction of CI build time - downloading 500MB of npm packages or Maven dependencies on every CI run can add 2-5 minutes that caching eliminates entirely. Compilation output caching makes the second build of a given source state essentially free, which is directly valuable for agent iteration loops where the same baseline code is compiled many times.
L2 caching is not the end state for AI-enabled development. Local caches don't share results across developer machines or CI runners. Concurrent agents in different worktrees can't benefit from each other's compilation work. But L2 caching is the necessary foundation for L3 remote execution - you need to understand cache keying, cache hit rates, and cache invalidation before layering on distributed builds.
Why It Matters
- Dependency caching alone can cut CI time by 30-50% - downloading dependencies is often the largest single CI step, and it's entirely eliminable with proper caching
- Warm build times drop to near-zero for unchanged code - a developer making a one-line change in a cached build sees only the compilation time for the changed file, not the full project
- Agent iteration loops benefit immediately - an agent iterating on a single module sees all other modules as instant cache hits; only the module under change is recompiled
- Cache configuration is low-risk, high-reward - unlike remote execution infrastructure, local caching requires no external services and has minimal failure modes
- Establishes the measurement baseline for L3 - cache hit rates and build time profiles measured at L2 inform the ROI calculation for investing in Bazel or remote execution
Getting Started
6 steps to get from here to the next level
Common Pitfalls
Mistakes teams actually make at this stage - and how to avoid them
How Different Roles See It
Bob has approved an initiative to improve developer productivity and wants to show a quick win. His DevEx lead has identified that CI pipeline time averages 12 minutes, with 4 minutes spent downloading dependencies on every run. This is a clear target: dependency caching should eliminate those 4 minutes immediately.
What Bob should do - role-specific action plan
Sarah has been collecting CI time data and sees that the distribution is bimodal: fast builds under 4 minutes (cache hits) and slow builds over 12 minutes (cache misses). The slow builds happen predictably when lock files change or new CI runners start. She wants to narrow this distribution.
What Sarah should do - role-specific action plan
Victor has implemented all local and CI caching and is getting consistent warm build times of 45 seconds for his main module. But he's realized that local caches are not shared between his 4 parallel worktrees - each worktree maintains its own Gradle cache, so the same compilation work happens 4 times instead of once.
What Victor should do - role-specific action plan
Further Reading
5 resources worth reading - hand-picked, not scraped
From the Field
Recent releases, projects, and discussions relevant to this maturity level.