mirror of
https://github.com/actions/cache.git
synced 2026-02-07 18:47:24 +00:00
Fix cache re-evaluation key example in caching strategies docs
Based on the example provided, the save key here would always be different from the cache restore key. And on top of that, the function call for `hashFiles` looked incorrect on the save action (both in casing and for the files it was hashing). This PR aligns the examples so they'd restore & save for the same purpose.
This commit is contained in:
parent
b7e8d49f17
commit
830f24e4d8
1 changed files with 1 additions and 1 deletions
|
|
@ -238,7 +238,7 @@ Case 2: Where the user would want to re-evaluate the key
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/cache/save@v5
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
key: npm-cache-${{hashfiles(package-lock.json)}}
|
key: cache-${{ hashFiles('**/lockfiles') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Saving cache even if the build fails
|
### Saving cache even if the build fails
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue