This message was deleted.
# community-support
s
This message was deleted.
c
Before we used to use a monolithic cache in gitlab
Copy code
cache:
    - key: "$CI_COMMIT_REF_NAME" # per branch caching
      fallback_keys:
        - "$CI_DEFAULT_BRANCH"
      paths:
        - $GRADLE_USER_HOME/caches/modules-*/files-*
        - $GRADLE_USER_HOME/caches/modules-*/metadata-*
But now our cache is invalid at the end of every build.
a
Here are some of them with versions: https://github.com/gradle/gradle/blob/master/platforms/software/dependency-managem[…]a/org/gradle/api/internal/artifacts/ivyservice/CacheLayout.java So
metadata-*
didn't change since 8.2,
transforms-
changed to
transforms-4
with 8.6 though (although that doesn't matter if you want to cache just dependencies)
c
I’m trying to cache whatever makes gradle builds the fastest 😉
In the docs it says you can cache modules-<version>
We’ve previously been caching files-* and metadata-*, as opposed to manually filtering out *.lock or gc.properties files
c
perhaps check the caching logic in gradle-build-action (for GitHub), see what is cached there.
c
c
there’s further refinement deeper in the code somewhere on the specifics iirc