{
  "id": 21841868,
  "title": "Content-Addressed Storage vs Version Control: Naming by What or by When",
  "url": "https://urgent.news/2026/11/25/content-addressed-storage-vs-version-control-naming-by-what-or-by-when",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-25T19:20:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gxqwb_ai/content-addressed-storage-vs-version-control-naming-by-what-or-by-when-2h80"
  },
  "original_language": "en",
  "account": "Content-addressed storage (CAS) and version control (VC) both identify data, but they do so in fundamentally different ways. In CAS, a file's name is a cryptographic hash of its contents. This means that if two files have the same hash, they contain identical data. The hash serves as an invariant - if the hash matches, the bytes are guaranteed to be identical. This guarantees the integrity of the data, preventing silent content changes.\n\nOn the other hand, VC systems identify data by its position in a history. The same bytes can have multiple names depending on the branch and commit they reside in. In VC systems, the file's identity is its path within this history. This allows for tracking changes, who made them, and how the file evolved over time.\n\nThe distinction between CAS and VC is not merely academic. It has significant implications for how systems are designed. For instance, content-addressed storage systems like IPFS, Git's object database, and many deduplicating backup tools are built on the CAS model. In contrast, version control systems like Git present a history-oriented interface to users, with stable paths as their interface.\n\nThe two models are not mutually exclusive. In fact, many systems use both. For example, container registries use content digests for layers, and reproducible builds rely on hashes for verification. However, the choice of model significantly impacts the system's functionality and reliability.\n\nOne practical application of CAS is in caching compiled dependencies for build systems. If the cache is keyed by package name and version, a corrupted download under the correct name can contaminate the cache for everyone. However, if the cache is keyed by the hash of the input files and the toolchain, a cache hit guarantees the inputs were identical. The hash computation, while costing a bit of extra computation, removes a whole class of stale-cache bugs.\n\nOn the other hand, VC systems offer a rich history of changes. They can track who edited a file, what the differences were, and how to move between states. This is invaluable for debugging regressions, as the history provides context to the hash-based verification.\n\nIn conclusion, the choice between CAS and VC depends on the system's requirements. If identity and data integrity are paramount, CAS is the way to go. If tracking changes and maintaining a history are crucial, VC is more suitable. Often, a combination of both models yields the best results.",
  "summary": "Ask a developer what a file is identified by and they will usually say its path. Ask a distributed systems engineer and they will say its hash. Ask someone who lives in Git and they will say its commit. These are three different answers to the same question, and the tension between the second and the third shows up in a surprising amount of modern infrastructure, from container registries to…",
  "key_points": [
    "Content-addressed storage uses cryptographic hash of file contents as its name",
    "Version control identifies data by position in history, not by content",
    "Both models can be used together in systems like container registries"
  ],
  "editors_take": null,
  "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."
}