I don’t know what you mean by this. What is the global “cache”? Gradle has many caches (e.g. dependency cache, file hashes cache, metadata cache, build cache, etc.).
What cache are you talking about here? Do you mean you want to use a project specific Gradle user home per build? Or do you want to configure the local directory build cache to use a directory in the current project for the build cache.
If you are talking about the build cache, using a local cache per project should be fine, as long as the cache is shared by multiple builds on the same project. If you run into problems with concurrent access, use a remote build cache.
I suppose this is about the dependency cache? There is the --refresh-dependencies
command line switch. You also may be interested in how to handle changing and dynamic versions.
Cheers,
Stefan