Some changes of mine was reworked by someone and upstreamed:
https://github.com/ccache/ccache/commit/e8354384f67bc733bea5...
If you follow the link to the mailing list posting, you will see I implemented a feature: search through multiple caches.
Say you have a build server which populates a cache. Your developers can point their ccache installations to that. However, ccache wants to write things there. The fix is to have a two-level hierarchy: ccache will look in their local cache first, and then the one from the server. If there is a cache miss, it goes to the local one; the server cache isn't polluted with development objects.