There was commercial fork of clang zapcc[1] that did caching of headers and template instantiations with an in memory client server system[2], but idk if they solved all the correctness issues or not before abandoning it.
[1] https://github.com/yrnkrn/zapcc
[2] https://lists.llvm.org/pipermail/cfe-dev/2015-May/043155.htm...