diff --git a/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md b/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md index 294e42e58b..a1aab92d30 100644 --- a/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md +++ b/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md @@ -102,7 +102,16 @@ For more information, see [`actions/cache`](https://github.com/actions/cache). ~/.gradle/wrapper ``` - With `v1` of the `cache` action, only a single path is supported and it must be a directory. You cannot cache a single file. -- `restore-keys`: **Optional** An ordered list of alternative keys to use for finding the cache if no cache hit occurred for `key`. +- `restore-keys`: **Optional** A string containing alternative restore keys, with each restore key placed on a new line. If no cache hit occurred for `key`, these restore keys are used sequentially in the order provided to find and restore a cache. For example: + + {% raw %} + ```yaml + restore-keys: | + npm-foobar-${{ hashFiles('package-lock.json') }} + npm-foobar- + npm- + ``` + {% endraw %} ### Output parameters for the `cache` action