What are practical reasons for using multiple cache directories or clearing cache altogether when using CCACHE?
Help description for Buildroot BR2_CCACHE configuration option says:
Note that Buildroot does not try to invalidate the cache contents when the compiler changes in an incompatible way. Therefore, if you make a change to the compiler version and/or configuration, you are responsible for purging the ccache cache by removing the $HOME/.buildroot-ccache directory.
If I understand correctly, different compiler builds are recognized by CCACHE and caching is done on per-compiler basis. So, what are those situations that description is referring to?
Also, some sources seem to suggest that cache should be cleared regularly. Others point out that cache is cleaned up automatically when it reaches the "max cache size" threshold.
Obviously, if cached data is corrupted, then you need to do something about it. Are there other reasons to clear the cache? Wouldn't it make sense to keep a single cache?