I have practically no problems using ccache . Sometimes (for example, once a month or even less) I completely clear its cache using ccache -C .
I have more problems with complex Makefiles than with ccache .
In short, don't worry, and when you suspect something, just run ccache -C .
Obviously, you should avoid ccache when you are compiling compile time. (You can pass -time or -ftime-report to gcc or g++ in this case).
Addenda
I believe that ccache should at least be configured to disable caching for compilation using GCC plugins, as the GCC plugin could do something (e.g. query a database or a web service) that is not cached. See this post .
source share