phase1, phase2: add unified ccache handling