[ccache] globally unique hashes

Joel Rosdahl joel at rosdahl.net
Sun Jun 20 11:06:30 MDT 2010


On 2010-06-20 17:26, Reuben Hawkins wrote:
> I was wondering if the hash values generated by ccache are globally unique.
> I was thinking about adding a multicast feature where after not finding a
> cached object file in the local cache, but before trying to compile the
> file, ccache will multicast to it's neighbors the hash value to see if
> another local machine has the cached object file corresponding the the hash
> value.  For this to work, however, I would think the hash values MUST be
> globally unique across platforms and compilers.  Is that the case?

The hash sum currently doesn't include any information about the
platform and also nothing about the compiler except the mtime and size
of the compiler binary. Maybe hashing some of the data printed by the
-dump* options to GCC would be enough for your use case.

You could maybe also think about how your idea compares to sharing the
cache over NFS.

> a) I've been assigned a 5 day project to do whatever I'm interested in

Nice!

-- Joel


More information about the ccache mailing list