Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

A data protection audit finds that personal data deleted from your primary databases still lives in caches, search indexes and replicated read models for weeks. How would you build a programme that makes erasure and retention rules apply to every copy of data, including caches?

I would treat every cache, search index and read model as a data store in the data inventory, with an owner, a description of the personal data it holds and a maximum retention. Caches holding personal data must have TTLs short enough that copies expire within the legal deadline even if deletion events are lost. The owning service publishes deletion events and every consumer, including caches and indexes, must act on them. We test erasure end to end on a schedule and keep the evidence for auditors, and wherever the use case allows we cache identifiers or non-personal projections instead of personal data.

Why this question is asked

Data protection laws such as the GDPR give people a right to have their personal data erased, and they require organisations not to keep personal data longer than needed. Most companies build erasure for the primary database and forget that the same data lives on in caches, search indexes, replicated read models, analytics extracts and backups. An audit finding like this one is serious, because it shows that the deletions the company reported were not real deletions. Interviewers ask this question to see whether a senior leader can turn a compliance finding into an engineering programme that works across every copy, not a one-off clean-up. In this answer, we will see why copies survive, build the inventory, use TTLs as a guarantee, make deletion events part of every consumer's contract, prove erasure with tests, and reduce the problem by caching less personal data.

1Why Deleted Data Survives in Copies

When a customer asks to be erased, the owning service deletes their rows. But other systems hold copies made earlier: a Redis cache of customer profiles with no TTL, an Elasticsearch index used by support tools, a read model in another service built from events, a nightly extract. None of them knows the deletion happened, unless someone told them, and some have no expiry at all, so the data can stay for weeks or forever. The legal deadline, typically about a month for responding to an erasure request under the GDPR, applies to all of these copies, whether the engineers think of them as storage or not. The exact deadlines and exceptions are a question for the legal team in each jurisdiction.

2Every Copy in the Data Inventory

The programme starts by making copies visible. The data inventory, the record of where personal data lives that many organisations already keep for compliance, is extended to include every cache, index, read model and extract. Each entry names an owner, what personal data it holds, which service it copies from, how it learns about deletions and its maximum retention. A copy without an owner or without an answer to the deletion question is a finding to fix, not an exception to note.

Discovery needs help from engineering, because teams forget caches. Scanning Redis key prefixes and index names, listing consumers of customer events and reviewing the caching starter's configuration across services finds most of them.

3TTLs as the Guarantee, Events as the Speed

Events can be lost: a consumer that is down, a bug in a handler, a topic with a short retention. So the programme does not rely on events alone. Any cache holding personal data must have a TTL short enough that, even if every deletion event were lost, the copy would expire within the legal deadline with margin. If the deadline is 30 days, a cache TTL of a day or less is comfortably inside it, and most caches can be much shorter. For indexes and read models, which do not expire naturally, the equivalent is a periodic reconciliation job that removes records whose source no longer exists.

Deletion events then give us speed: the copy disappears within seconds or minutes in the normal case, and the TTL or reconciliation is the guarantee.

How each copy meets the deadline
CopyFast pathGuarantee if the event is lost
Redis profile cacheevict on customer-erased eventTTL of at most 24 hours
Local Caffeine cachesevict on eventTTL of minutes
Search indexdelete document on eventdaily reconciliation against the owner
Read model in another servicedelete rows on eventweekly reconciliation job
Backupsnot editedexpire by backup retention; restore procedure re-applies erasures
Backups need a legal position and a restore procedure, not live editing.

4Deletion Events as Part of Every Consumer's Contract

The owning service publishes a customer-erased event after it has deleted the data, through an outbox so it is never lost by the owner. Every system that copies customer data must subscribe and delete its copy, and this is written into the contract for consuming customer data: you may not consume customer events unless you also handle erasure. Consumers record that they processed each erasure, so we can see which copies are complete.

Step throughOne erasure request across all copies
  1. Owner deletes the customerprimary database, in one transaction with an outbox row
  2. Publishes customer-erasedid only, no personal data in the event
  3. Each consumer deletes its copycache, index, read model, extract
  4. Consumers confirm processingerasure ledger per request
  5. All copies confirmed within the deadline?
    YesClose the request with evidenceNoEscalate to the copy's owner

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

5Testing Erasure and Keeping Evidence

Erasure that is not tested will drift as new copies appear. So we run an end-to-end test on a schedule, for example weekly in a production-like environment: create a synthetic customer, let it spread through caches, indexes and read models, request erasure, and after the stated time check every copy in the inventory for any trace of it. A failure points at a specific copy and owner.

For auditors, the erasure ledger, the per-request record of which copies confirmed deletion and when, together with the test results, is the evidence. It turns "we believe we delete everywhere" into "here is proof for each request and each copy".

6Caching Less Personal Data

The cheapest copy to erase is the one we never made. Many caches hold full customer profiles when the use case needs much less: a support search may only need an id and a ticket count, a pricing cache may only need a customer tier. The programme asks every cache of personal data whether an identifier or a non-personal projection would do. Each copy that stops holding personal data leaves the scope of the erasure programme entirely, which is a better result than any amount of invalidation.

7Follow-up questions

Should deletion events contain the personal data being deleted?

No. They should carry only the identifier needed to find the copies. An event containing the name and address would itself become another copy of personal data, kept in the event log for its retention period. Consumers use the id to find and delete their own records.

What about logs and analytics?

They are copies too and belong in the inventory. Logs should avoid personal data in the first place, through structured logging that masks or omits it, and have retention limits within the deadline. Analytics should work on pseudonymised or aggregated data where possible, with a documented erasure or retention approach for anything that remains.

8Conclusion

In this answer, we built a programme that makes erasure and retention apply to every copy of personal data. Every cache, index and read model is added to the data inventory with an owner, contents and maximum retention. Caches of personal data get TTLs that guarantee expiry within the legal deadline, while indexes and read models get reconciliation jobs. The owning service publishes id-only deletion events that every consumer must act on and confirm, erasure is tested end to end on a schedule with a ledger as evidence for auditors, and the scope is reduced by caching identifiers or non-personal projections wherever possible.

What to say in the interviewAbout 90 seconds aloud

Open with

I would treat this as a programme rather than a clean-up, because the finding shows that our deletions only reached the primary databases. First, every copy becomes a data store in the data inventory: each cache, search index, read model and extract gets an owner, a description of the personal data it holds, how it learns about deletions and its maximum retention.

Then, if they want more

Discovery needs engineering help, scanning key prefixes, index names and event consumers. Second, I would not rely on events alone, because events get lost.

Any cache with personal data must have a TTL that guarantees expiry inside the legal deadline with margin, say a day at most, and indexes and read models that do not expire get reconciliation jobs against the owner.

Third, the owning service publishes an id-only customer-erased event through an outbox, and consuming customer data comes with the obligation to handle erasure and confirm it in an erasure ledger. Fourth, a scheduled end-to-end test creates a synthetic customer, lets it spread, erases it and checks every copy, and the ledger plus test results are the evidence for auditors.

Backups need a legal position and a restore procedure that re-applies erasures. And finally, the best fix is fewer copies: wherever possible, cache identifiers or non-personal projections, which takes them out of scope entirely.

About this answer

Last updated
12 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 documentation below. 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 "A data protection audit finds that personal data deleted from your primary databases...": https://scrivio-interview-library.netlify.app/databases/caching/cedb564145/