{
  "id": 20146902,
  "title": "GitHub Actions cache: keys, scopes and the limits that decide a hit",
  "url": "https://urgent.news/2026/11/15/github-actions-cache-keys-scopes-and-the-limits-that-decide-a-hit",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-15T08:56:52.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/kalemi/github-actions-cache-keys-scopes-and-the-limits-that-decide-a-hit-4529"
  },
  "original_language": "en",
  "account": "A GitHub Actions cache is a keyed, immutable archive that is scoped to a single repository, with a default size limit of 10 GB and an expiration of 7 days without a read. Cache misses are not errors; instead, the step prints a line, exits with a zero status, and hands over the installation files.\n\nThe lookup process first attempts to use the exact provided key, and if it cannot find it, it tries the restore-keys listed in the order they were provided, treating each as a prefix. The most recently matching entry is then restored, and the cache-hit flag is set to false, triggering a save step that writes a fresh entry under the exact key.\n\nEach cache entry is an archive stored against an exact string, which means even a single character difference results in a complete miss. This design is why caching is a significant speed-up for most pipelines, but also the quietest way to experience delays when keys are not designed properly.\n\nThe key must include every input that changes what ends up in the cached directory. If an input changes but the key remains the same, the new content is never stored, and the next run will restore the old content forever. This design rule emphasizes that every input affecting the cached directory should be included in the key.\n\nUsing an artifact as a cache works, but it costs additional storage space. On the other hand, using a cache as durable storage is unreliable, as caches are evicted when they reach the 10 GB limit or after 7 days of inactivity. Therefore, it is essential to understand the distinction between caches and artifacts and use them appropriately in GitHub Actions workflows.",
  "summary": "A GitHub Actions cache is a keyed, immutable archive scoped to one repository, capped at 10 GB by default and removed after 7 days without a read. Almost everything people call a caching bug is one of those four words arriving without a log line to announce it. The lookup order and the three limits, from docs.github.com and the actions/cache source, both read on 2026-09-20. Caching in Actions is…",
  "key_points": [
    "GitHub Actions cache is keyed, immutable archive scoped to a single repository",
    "Default size limit is 10 GB with 7-day expiration without read",
    "Cache miss triggers step print, zero status exit, and fresh entry save"
  ],
  "editors_take": "Improperly designed cache keys transform a performance optimization into a source of silent pipeline delays by failing to capture every input that alters the cached directory contents.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}