From 830f24e4d86496f2b67fb255fee31df584f23d00 Mon Sep 17 00:00:00 2001 From: Madison Swain-Bowden Date: Wed, 4 Feb 2026 11:51:19 -0800 Subject: [PATCH] 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. --- caching-strategies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caching-strategies.md b/caching-strategies.md index aaf2b8c..ee58051 100644 --- a/caching-strategies.md +++ b/caching-strategies.md @@ -238,7 +238,7 @@ Case 2: Where the user would want to re-evaluate the key ```yaml uses: actions/cache/save@v5 with: - key: npm-cache-${{hashfiles(package-lock.json)}} + key: cache-${{ hashFiles('**/lockfiles') }} ``` ### Saving cache even if the build fails