I’ve had mixed results with ccache myself, ending up not using it.
Which problems did you experienced?
Compilation times are much less of a problem for me than they were before, because of the increases in processor power and number of threads.
To each its own, but with C++ projects the only way to not stumble upon lengthy build times is by only working with trivial projects. Incremental builds help blunt the pain but that only goes so far.
This together with pchs (...)
This might be the reason ccache only went so far in your projects. Precompiled headers either prevent ccache from working, or require additional tweaks to get around them.
https://ccache.dev/manual/4.9.1.html#_precompiled_headers
Also noteworthy, msvc doesn't play well with ccache. Details are fuzzy, but I think msvc supports building multiple source files with a single invocation, which prevents ccache to map an input to an output object file.