[ccache] cache coherency across multiple users
funtoos at yahoo.com
Fri Apr 1 10:05:19 MDT 2011
A quick question: man page suggests that it is possible to share ccache across
multiple developers by following a set of rules for permissions, umask and
setting up of ccache dirs env vars etc. What it doesn't talk about is what
happens if two developers are compiling at the same time and there is a cache
miss and ccache needs to write the newly created object to the ccache directory.
What happens to two (or more) write calls arriving at the same time? Is there
some sort of locking in place to avoid getting garbage in the resultant object
What about the case where one gets a hit and wants to read while the other gets
a miss and wants to overwrite the object with the new object file?
And the case, where cache size management needs to throw away an existing object
file to replace with another object file? Another developer's run may be reading
it while this run is throwing it away.
Thanks for your time!
More information about the ccache