Document that no cache is saved on an exact match and thus file hashes should be included in keys

This commit is contained in:
John T. Wodder II 2020-10-20 14:41:08 -04:00
parent 438628ac22
commit 3aa7090cb9

View file

@ -27,7 +27,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in
### Inputs
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
* `key` - An explicit key for restoring and saving the cache
* `key` - An explicit key for restoring and saving the cache. When an exact match is found for this key, the cache will not be saved at the end of the workflow, and so it is recommended to make the key uniquely correspond to the set of files present in the cache, e.g., by including a file hash of exact-version dependencies.
* `restore-keys` - An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note
`cache-hit` returns false in this case.