From a1ad2000b3447224fd80533038cfa7091999edb9 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Tue, 31 Aug 2021 21:42:01 +0200 Subject: [PATCH] Describe cache key format in readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17e023b..4dbff87 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,11 @@ Currently, the following distributions are supported: **NOTE:** Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` to `temurin` to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/). ### Caching packages dependencies -The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle and maven. The cache input is optional, and caching is turned off by default. +The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle and maven. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files: +- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties` +- maven: `**/pom.xml` + +The cache input is optional, and caching is turned off by default. #### Caching gradle dependencies ```yaml