CI/CD & DevOps / Quiz
Cache Money
Cache keys, restore-keys, and the cache-vs-artifact distinction that decides whether your pipeline is fast, stale, or both.
- Difficulty
- Medium
- Format
- Quiz
- Points
- 150
- Estimate
- 10 min
// MISSION BRIEF
Your Mission
A 14-minute install step is a tax on every test run, and a wrong cache key is a haunted pipeline. This quiz covers dependency caching done right in GitHub Actions, and when an artifact, not a cache, is the tool.
Scoring: timed quiz; accuracy first, speed bonus for fast clean runs.
// FIRST CONTACT
Battle teaser
A solid cache key for npm dependencies:
- AThe branch name alone
- BIncludes the OS and a hash of the lockfile, e.g. runner.os + hashFiles('**/package-lock.json'), so the cache invalidates when dependencies change
- CA fixed string like `deps-cache-v1` forever
- DThe current timestamp, for freshness
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
ci-cdgithub-actionscachingartifacts