[ccache] What to do when there are problems writing to the cache directory?

Joel Rosdahl joel at rosdahl.net
Sun May 13 12:28:37 MDT 2012


On 7 February 2012 19:55, Frank Klotz <frank.klotz at alcatel-lucent.com> wrote:
> [...] inability to write to the stats file should be a fatal error (it will
> get attention FAST, and so fixed quickly), but [...] when the stats file is
> writable, then placing an indication of the problem there is "not silent", so
> it would be acceptable to document the failure in the stats and continue with
> a regular compilation that is "otherwise silent".

One problem with putting such an error log in the stats files: who will trim
the error log from the stats files? The files are rewritten for each cache
hit/miss, which means that it's not good if they grow. Another minor but valid
problem with the approach is that it's not backward compatible - old ccache
versions (which may use the same ccache directory as a new version) throw away
anything they don't understand from the stats files. I guess it would be
possible to write the log to some other file in the ccache directory, though,
unless that's not possible either...

> If other people check "ccache -s" as often as I do [...]

I doubt many people check "ccache -s" often, I'm afraid.

-- Joel


More information about the ccache mailing list