Build cache missing through cross platform build

Hey all

Gradle remote cache is one of the most amazing idea I’ve ever seen it. I enabled local mode and it helped me cut off 60% time of a clean build which is fantastic.

Now, I’m trying to introduce remote mode to my project. However, the cache keys are different between different machine even if I used the same branch to build.

So, I followed the guide, and find that cache relocatability is correct in a single machine. Then, I built my branch in several machines(Mac OS, Ubuntu 16.04, Ubuntu 18.04) and all the cache keys for the single task are different.

Is there a way to help me figure out the root cause of cache missing? For example, I know that there are 6 factors determine the cache key(, can I debug each factor to see if there is a difference between my two machines?

I’m afraid my company blocks build-scan plugin so that I can’t take advantages of that tool. My first guessing is probably related to the environmental difference.


Did you read the “debugging” section of the build cache guide ( ?

I think your best bet is to use the debugging flag -Dorg.gradle.caching.debug=true to get information on how the cache keys are constructed.