dependency cache
Saved copies of downloaded dependencies that GitHub Actions restores into later runs so they need not be fetched again.
In more detail
The cache action restores a directory under a key before the job body and saves it after the job succeeds; its cache-hit output is true only for an exact key match. Entries are immutable, scoped per branch with a fallback to the default branch, and evicted when unused for about a week or when the repository exceeds its limit. Cache inputs such as downloads only: never build output and never secrets.
Related terms
- cache key — The name a cache entry is saved and looked up under, usually built from the operating system and a hash of the lock file.
- restore-keys — A list of key prefixes the cache action tries, in order, when no entry matches the exact key.
- cache poisoning — An attack that plants malicious content in a cache so later trusted builds restore and use it.
- artifact — A file produced by a build, such as a compiled program or an image, that is stored and passed on to later steps.
Taught in
- Passing Data Between Jobs: Artifacts — Continuous Integration & Continuous Delivery Pipelines
- Speeding Up Builds: Caching Dependencies — Continuous Integration & Continuous Delivery Pipelines
- Outputs, Artifacts, Caches And Job Summaries — GitHub Actions (GH-200) Exam Prep
- Faster And Cheaper: Where The Minutes Go — GitHub Actions (GH-200) Exam Prep