Skip to content
Latchkey

Cache Key - CI/CD Glossary Definition

A cache key is the identifier passed to actions/cache (the key: input) that uniquely names a cache entry, usually built from a runtime version and a hash of a lockfile so a new entry is created when dependencies change.

Building a good key

A common pattern is key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}. An exact key hit restores and skips re-downloading; a miss with no restore fallback rebuilds from scratch and saves a new entry at the end of the job.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →