[ccache] CCACHE_READONLY=1 setting now working

Joel Rosdahl joel at rosdahl.net
Fri Feb 20 13:09:34 MST 2015


Hi Dinesh,

> I am using ccacge version 3.1.9 and trying a build with CCACHE_READONLY=1
> and it seems not to be working. It tries to write back to the ccache.
[...]

The problem mentioned in the mail to which you refer was that ccache tried
to create subdirectories in the cache and exited with a fatal error if it
couldn't create them, even when running in read-only mode. That was fixed
in 3.1.9.

It's true that ccache still performs some write operations in read-only
mode: it updates statistics counters and updates mtime of files in the
cache in case there was a cache hit (this is to be able to tell which files
can be removed when the max cache size limit is reached). If ccache can't
perform those updates due to lack of permission, it just continues with
life silently. Thus, read-only mode should be interpreted as "will not add
new compilation results to the cache", not "will not perform any write
operations to the cache".

>From your question, I assume that this behavior is not what you expected or
wanted. Is it a problem in your case that ccache performs those write
operations? Or have you found a case where ccache in read-only mode
actually writes the result of a compilation into the cache?

-- Joel


More information about the ccache mailing list