- All playbooks
- Caching and setup
- Remove caches that cost more than they save
Remove caches that cost more than they save
Measure cache restore and upload time against the work avoided. Remove caches whose transfer cost outweighs their benefit.
Compare approaches
How companies used this technique
Read what each company changed and follow the original sources.
Remove a cache when restoring it costs more than rebuilding
Linear measured a node_modules cache hit at about 28 seconds to restore, against roughly 7.5 seconds for a filtered install. The cache key depended on a frequently changing lockfile, so Linear removed the cache.
- Use it when
- Comparable measurements show restore and save overhead outweighing the work avoided.
- Before applying it
- First try a package-manager store or a narrower cache, and separate miss-rate problems from an expensive successful restore.
Drop a cache that costs more than it saves
Release-tag runs saved Cargo caches that later tagged runs rarely used. Codex removed the cache step from both release workflows and kept compilation, signing, packaging and publishing as they were.
Across 289 release-tag runs: 66,295s spent saving caches against 1,515s restoring them Source
- Use it when
- Cache save and restore overhead is large and reuse is low.
- Before applying it
- Check key stability and restore fallbacks first. Removing a cache shortens saves and makes the occasional warm run cold.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed