Work out build time savings from cache instantly with clear inputs, formula shown and shareable results.
Caching turns build time into a weighted average of the warm and cold paths. Because the hit rate multiplies the saving, moving from 60 to 90 percent hit rate matters as much as making the warm path faster. The daily compute hours saved is the figure that converts directly into runner cost or reduced queueing.
Cached build time
average = hit rate x warm time + (1 - hit rate) x cold time; saving per build = cold - average
Cache keys that include volatile content such as timestamps or full lockfile hashes that change on any dependency bump, and per-branch caches that never share with the mainline.
Yes, if the key does not capture everything that affects the output. Always include the toolchain version and the dependency manifest hash in the key.