jlebar added a comment. This actually has a subtle issue not found with existing unit tests: BuildJobsForAction has an outparam and we don't set it on cache hit. Please hold off reviewing this until I fix the problem. http://reviews.llvm.org/D15960