Skip to main content
1 of 2
Paul Draper
  • 6k
  • 3
  • 25
  • 37

Caching build results

This is a "technology/concept identification" question.

I have a rather large project in a DCVS repository.

Build times are loooong (about an hour) from a full clean.

The project is already divided into subprojects, with incremental building. But it still takes a very a long time when switching branches, etc., since I'll often have to compile a lot.

I had an idea of caching the subproject outputs (I'm using Scala, so in this case, it's a bunch of .class files), and publishing them with the hash of the source as the key. Before a build, I would download any outputs that matches the hashes of any of the subprojects. The "pain" of building would be shared and reused across the organization, including the CI server.

I can't have been the first person to think about this.

Is there a name for this caching-by-source (rather than explicit version)? Is it commonly implemented? Any existing tools around this?

Paul Draper
  • 6k
  • 3
  • 25
  • 37