+2
日增长
5,602
stars
1,617
forks
124
watchers
616
prs
898
issues
74
releases
README
Cache action This action allows caching dependencies and build outputs to improve workflow execution time. Two other actions are available in addition to the primary cache action: Restore action Save action Documentation See "Caching dependencies to speed up workflows". What's New ⚠️ Important changes [!IMPORTANT] actions/cache@v5 runs on the Node.js 24 runtime and requires a minimum Actions Runner version of 2.327.1. If you are using self-hosted runners, ensure they are updated before upgrading. The cache backend service has been rewritten from the ground up for improved performance and reliability. actions/cache now integrates with the new cache service (v2) APIs. The new service will gradually roll out as of February 1st, 2025. The legacy service will also be sunset on the same date. Changes in these releases are fully backward compatible. We are deprecating some versions of this action. We recommend upgrading to version v4 or v3 as soon as possible before February 1st, 2025. (Upgrade instructions below). If you are using pinned SHAs, please use the SHAs of versions v4.2.0 or v3.4.0. If you do not upgrade, all workflow runs using any of the deprecated actions/cache will fail. Upgrading to the recommended versions will not break your workflows. Additionally, if you are managing your own GitHub runners, you must update your runner version to 2.231.0 or newer to ensure compatibility with the new cache service. Failure to update both the action version and your runner version may result in workflow failures after the migration date. Read more about the change & access the migration guide: reference to the announcement. v6 Updated @actions/cache, @actions/core, @actions/exec to latest major versions Migrated to ESM module system v5 Updated to node 24 Requires a minimum Actions Runner version of 2.327.1 v4 Integrated with the new cache service (v2) APIs. Updated to node 20 v3 Integrated with the new cache service (v2) APIs. Added support for caching in GHES 3.5+. Fixed download issue for files 2GB during restore. Updated the minimum runner version support from node 12 - node 16. Fixed avoiding empty cache save when no files are available for caching. Fixed tar creation error while trying to create tar with path as ~/ home folder on ubuntu-latest. Fixed zstd failing on amazon linux 2.0 runners. Fixed cache not working with github workspace directory or current directory. Fixed the download stuck problem by introducing a timeout of 1 hour for cache downloads. Fix zstd not working for windows on gnu tar in issues. Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable SEGMENT_DOWNLOAD_TIMEOUT_MINS. Default is 10 minutes. New actions are available for granular control over caches - restore and save. Support cross-os caching as an opt-in feature. See Cross OS caching for more info. Added option to fail job on cache miss. See Ex
Top issues
#31Docker caching54 comments · 2019-11-01#720Extremely slow cache on self-hosted from time to time44 comments · 2022-01-27#109Enable always writing cache to support hermetic build systems38 comments · 2019-11-21#319Allow caching for deployment events or other events without GITHUB_REF35 comments · 2020-05-17#752Cache restoration is orders of magnitude slower on Windows compared to Linux.32 comments · 2022-03-02#354Alternative storage backend29 comments · 2020-06-21#342Feature request: option to update cache29 comments · 2020-06-02#1361cache restore on versions 3 and 4 not working28 comments · 2024-03-19
Discussions
#1609📢 Important Announcement: Our Discussions Are Moving to Github’s Main Community!0 comments · 2025-05-27#1582https://github.com/Milanhe92/cache.git0 comments · 2025-03-31#1510Deprecation Notice - Upgrade to latest before February 1st 20259 comments · 2024-12-04#1405Failed to save: Unable to reserve cache with key1 comments · 2024-05-23#1368How do you cache based on multiple paths at once?1 comments · 2024-03-30#1364engineering0 comments · 2024-03-20#1358Get cached file list1 comments · 2024-03-12#1306How is the "save-always" flag used?0 comments · 2024-01-20
Latest release
v6.1.0 v6.1.0 2026-06-26What's Changed Bump @actions/cache to v6.1.0 - handle read-only cache access by @jasongin in https://github.com/actions/cache/pull/1768 Full Changelog: https://github.com/actions/cache/compare/v6...v6.1.0