Scrivio Interview library
LeadershipPrincipal6 min read · updated 13 November 2026

Your teams spend a growing share of time on cache invalidation bugs and infrastructure: change streams, invalidation services and versioned keys. An architect argues the organisation should design data to be immutable and content-addressed wherever possible, so it never needs invalidation.

As the senior technical leader, how far would you push immutability as a caching strategy, and how would you lead the change?

I would push immutability hard where data is naturally versioned, such as static assets, documents, configuration snapshots, published catalogues and reference data, because an immutable key can be cached forever and invalidation shrinks to moving a pointer. I would not force it on highly mutable entities like stock or balances, and I would be honest that the cost moves to storing and cleaning up versions and to the pointers. I would lead through a preference order in the caching standard and platform support, starting with new systems and the worst offenders, and measure the effect in incidents and effort.

Why this question is asked

There is an old joke that cache invalidation is one of the two hard problems in computing. The architect's proposal is a real way out of it for much of our data: if a value never changes, there is nothing to invalidate. Interviewers ask senior candidates this because the idea is right in principle and dangerous as a blanket rule, and because the leadership question is how to change many teams' habits without a rewrite programme. In this answer, we will see why immutability removes invalidation, where it fits and where it does not, where the costs go, and how to lead the change.

1Why Immutable Data Needs No Invalidation

Invalidation exists because a key keeps its name while its value changes. If every change produces a new key instead, a cached value can never become wrong; it can only become unused. Build tools already do this for static assets: app.3f9a1c.js is named after a hash of its content, served with Cache-Control: max-age=31536000, immutable, and a new release simply references app.7b20e4.js. The same works for data: product:5001:v17, a document snapshot addressed by its content hash, or a configuration snapshot with an id.

What remains mutable is the pointer that says which version is current, such as the HTML page that names the asset or a small key saying product 5001 is at version 17. So invalidation shrinks from many large values to a few small pointers, which are easier to keep consistent and cheap to reload.

2Where It Fits and Where It Does Not

Immutability fits data that changes rarely, changes as a whole, or is published at moments: static assets, documents and their revisions, configuration snapshots, price lists or catalogues published per release, reference data, and append-only event logs from which views are derived. It fits poorly for entities that change constantly and are read as their latest value, such as stock levels, balances, presence or counters. A product whose stock changes every second would create a new version every second, and the pointer to the current version would need exactly the invalidation we tried to avoid. For that data, short TTLs, live reads or no caching are better.

Fit of immutable, versioned caching
DataFitWhy
Static assets, imagesExcellentContent hash in URL, cache forever
Documents, config snapshotsExcellentEach revision has its own id
Published catalogues, price listsGoodNew version per publish, one pointer
Reference dataGoodRare changes, versioned files
Stock, balances, presencePoorEvery change would be a new version

3Where the Costs Move

Immutability does not make costs vanish; it moves them, and the proposal should say so. Old versions must be stored and, at some point, removed, so we need retention rules and garbage collection that knows which versions are still referenced. The pointers become the critical mutable state: updating several pointers consistently, for example a catalogue and its price list together, needs care, and the pointers need their own caching rules, usually a short TTL or a pushed update. And some obligations conflict with keeping data forever, such as a request to erase personal data, which in an immutable store means deleting every version that holds it or encrypting per subject and destroying the key.

These costs are usually smaller than the invalidation machinery they replace, but they are owned by different people, so they must be planned rather than discovered.

4Setting a Preference Order

Rather than a mandate, I would write the caching standard as a preference order that teams follow when designing a new cache. First choice: immutable, versioned data cached without expiry, with a small mutable pointer. Second: mutable data with event-driven invalidation, for example from change data capture. Last: TTL-only caching, acceptable where some staleness is fine and the other options cost too much. Each design review asks which level a cache uses and why not the one above.

Step throughChoosing a caching strategy
  1. Can each change be a new version?Snapshots, assets, documents
    YesImmutable keys, cache foreverNoNext question
  2. Is there a reliable change event?Outbox or change data capture
    YesEvent-driven invalidationNoNext question
  3. Is bounded staleness acceptable?Agreed with the product owner
    YesTTL-only cachingNoDo not cache

3 steps in order. Play them, or step through them one at a time.

5Leading the Change

Teams adopt what is easy. So the platform should make the preferred path the easy one: versioned object storage such as S3 with versioning, a small pointer service or library that publishes and caches the current version, build pipelines that hash assets automatically, and library helpers that make versioned keys the default. Then I would apply it first where it pays most: new systems, which can design for it from the start, and the systems with the most invalidation incidents, where a move to versioned snapshots removes a whole class of bugs.

I would not ask teams to rewrite working systems for purity. Instead I would measure: invalidation-related incidents per quarter, engineering time spent on invalidation infrastructure, and cache hit ratios before and after each migration. If the numbers improve where we applied it, the case for the next systems makes itself; if they do not, we have learned where the idea stops paying.

6Follow-up questions

Where would immutability make things worse?

For highly mutable entities read as their latest value, because every change creates a version and the pointer churns as much as the data did. For large objects with tiny frequent edits, because storing a full copy per change multiplies storage. For data with deletion obligations, because removing every copy gets harder. And on hot read paths where resolving the pointer adds a round trip that a simple TTL cache would not need.

How do you convince teams that already have working invalidation?

With their own incident history and the cost of the machinery they maintain, not with principles. If a team spends a sprint a quarter on change-stream issues and versioned snapshots would remove them, the case is concrete. If their invalidation works quietly, they should keep it.

Is content addressing the same as versioning?

Content addressing derives the key from a hash of the content, so identical content always gets the same key and duplicates are stored once. Versioning gives each revision an id, often a counter. Both make values immutable; content addressing adds deduplication and lets anyone verify the content against its key.

7Conclusion

In this answer, we saw that immutable, versioned data removes invalidation because a change produces a new key, leaving only a small pointer to update. It fits assets, documents, snapshots, catalogues and reference data, and fits poorly for stock, balances and other constantly changing values. The costs move to version storage, cleanup, pointer consistency and deletion obligations. We would lead through a preference order in the caching standard, platform support that makes it easy, adoption in new systems and the worst offenders first, and measurement of incidents and effort.

What to say in the interviewAbout 80 seconds aloud

Open with

I agree with the direction, but as a preference, not a mandate. If a change creates a new key instead of changing an old one, a cached value can never be wrong, so it can be cached forever, and invalidation shrinks to updating a small pointer to the current version.

Then, if they want more

We already do this with hashed asset names. It works very well for static assets, documents, configuration snapshots, published catalogues and reference data, and for append-only events with derived views.

It works badly for stock levels, balances or presence, where every change would be a new version and the pointer would need the same invalidation we wanted to avoid; there, short TTLs or live reads are better. I would also be honest that costs move: storing and garbage-collecting old versions, keeping pointers consistent and cached correctly, and handling erasure requests.

To lead it, I would write a preference order into the caching standard: immutable and versioned first, event-driven invalidation second, TTL-only last, with design reviews asking why not the level above.

I would back that with platform support like versioned object storage and a pointer library, apply it to new systems and the worst offenders first, and measure invalidation incidents and effort to show whether it pays.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "As the senior technical leader, how far would you push immutability as a caching...": https://scrivio-interview-library.netlify.app/architecture/caching-strategies/1f1c8ac278/