8000 Fix cache re-evaluation key example in caching strategies docs by AetherUnbound · Pull Request #1716 · actions/cache · GitHub
[go: up one dir, main page]

Skip to content

Fix cache re-evaluation key example in caching strategies docs#1716

Open
AetherUnbound wants to merge 1 commit intoactions:mainfrom
AetherUnbound:patch-1
Open

Fix cache re-evaluation key example in caching strategies docs#1716
AetherUnbound wants to merge 1 commit intoactions:mainfrom
AetherUnbound:patch-1

Conversation

@AetherUnbound
Copy link

Description

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.

Motivation and Context

The documentation is a bit misleading here.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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.
@AetherUnbound AetherUnbound requested a review from a team as a code owner February 4, 2026 19:52
Copilot AI review requested due to automatic review settings February 4, 2026 19:52
Copy link
Contributor
Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the caching strategies documentation to ensure the “re-evaluate cache key” example uses a consistent cache key between restore and save, correcting the previously misleading example.

Changes:

  • Fixes the cache save key example to match the restore key prefix/pattern.
  • Corrects the hashFiles function casing/usage in the example so the demonstrated key computation is consistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0