actions/Cache
Cache artifacts like dependencies and build outputs to improve workflow execution time
View on GitHubTrust Signals
- Scorecard Score
- Scorecard 6–8scored Jul 6, 2026
- Maintenance Recency
- Activelast commit Jun 23, 2026
- License
- MIT
Pinned Snippet
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path | A list of files, directories, and wildcard patterns to cache and restore | yes | — |
| key | An explicit key for restoring and saving the cache | yes | — |
| restore-keys | An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. | no | — |
| upload-chunk-size | The chunk size used to split up large files during upload, in bytes | no | — |
| enableCrossOsArchive | An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | no | false |
| fail-on-cache-miss | Fail the workflow if cache entry is not found | no | false |
| lookup-only | Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | no | false |
| save-always | Run the post step to save the cache even if another step before fails | no | false |
Outputs
| name | description |
|---|---|
| cache-hit | A boolean value to indicate an exact match was found for the primary key |