The commit and the delete are a dual write with no shared transaction, so a crash between them leaves stale data. Keep a TTL as the upper bound on staleness, then make invalidation durable with the transactional outbox pattern: write an invalidation message to an outbox table in the same transaction as the data change, and have a relay (a BackgroundService or Azure Functions) publish it, retrying until subscribers have deleted the keys. Deletes are idempotent, so at-least-once delivery is fine. Alternatives: change data capture on SQL Server driving deletes, domain events in an event-driven design, or versioned keys, where the change bumps a version so new reads use a new key and old entries simply age out under their TTL.
Checks they know the dual-write problem and the outbox or CDC fix
Last updated 23 Nov 2026.