From bc5cf4a034ebf1d17b5348accc80fca62a00e8b6 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 5 Apr 2023 12:11:22 +0200 Subject: [PATCH] add notes for cache --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c174abe36..799976a5f 100644 --- a/README.md +++ b/README.md @@ -113,14 +113,16 @@ Currently, the following distributions are supported: **NOTE:** For Azul Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness. ### 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, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files: +The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies and it follows the same behaviour as for [actions/cache](https://github.com/actions/cache) but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache primary key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files: - gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, and `gradle/*.versions.toml` - maven: `**/pom.xml` - sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.{scala,sbt}` The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs). -The cache input is optional, and caching is turned off by default. +The cache input is optional, and caching is turned off by default. The action provides only a primary key. + +For more information about cache please refer to [Official documentation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows) #### Caching gradle dependencies ```yaml