This message was deleted.
# caching
s
This message was deleted.
e
if GitHub could resolve https://github.com/actions/toolkit/issues/505 then it would work much better for Gradle's build cache
but the current @actions/cache should already be useful for dependency caching - you're not updating those on every commit, are you?
j
Dependencies cache is kind of useful, but on GHA it sometimes takes a lot of time to fetch — and then extract. Therefore, it sometimes takes longer to handle cache via
@actions/cache
than fetching dependencies in from repository.
Unfortunately, it even leads to timeout for the whole workflow and a complete fail.
I wonder if
gradle/gradle-build-action
handles that in a better way, but probably not.
v
If you want superior handling, use the
gradle-cache-action
, it is longer around and superior, it is just less wide-spread as the other is the "official" one.
It even supports a remote build cache backed by GHA cache, on a file-by-file basis.
r
Do you really need that every commit to invalidate all project’s cache in all builds? Most probably you just need this information in the CI jobs that are publishing the artifacts, but not in the rest. If you are talking about number of commits to produce the versionCode, or you are using the sha of the head for anything, you could tweak your configuration to use fixed values in some of your CI builds (specially in the PRs, as are critically impacting developers experience). If your build setup allows these changes, then you could get the benefit of caching on CI.