In order to setup ccache+dmucs+distcc toolchain, ccache should be improved to support several binaries in CCACHE_PREFIX environment variable.
Created attachment 6226 [details] proposed patch for ccache-3.1.4 Attaching patch for review.
Thanks, looks good.
Applied in b453d43ac0dc7097bb8afb74db70ccf5cde3a914 on the master branch (which eventually will be version 3.2).
Included in v3.2.