actions/cache (actions/cache@v4) restores a cache by exact key match, then partial key matches, then restore-keys checked sequentially for partial matches; on a partial match the most recent cache is restored. An exact match is a cache hit; on a miss the action saves a new cache under the provided key and paths only if the job completes successfully. Existing caches cannot be modified — change contents by creating a new cache with a new key. The required key can combine variables, context values, static strings, and functions up to a maximum of 512 characters; the required path accepts a single path or several on separate lines, and restore-keys lists fallback keys one per line in the order they are tried. GitHub removes entries that have not been accessed in over 7 days. Total cache size defaults to 10 GB per repository, a limit enterprise owners, organization owners, or repository administrators can increase; once reached, eviction deletes caches in order of last access date, oldest first. Rate limits allow 200 cache uploads and 1,500 downloads per minute per repository. Scope: GitHub Actions. Reviewed October 4, 2026.
Dependency caching with actions/cache
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- docs.github.com
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.