r/redis • u/ResistPast3564 • 3h ago
Help Have you run into Redis serving stale data after the database was updated?
I'm curious how common this is. If you use Redis as a cache in front of a database (Postgres, MySQL, etc.), have you had cases where the database had the new value but Redis kept serving the old one?
If so, I'd like to hear:
- What caused it? A delete that never happened, a bulk update or background job that skipped the cache, someone editing the DB directly, a race between a read and a write, a failed DEL during a network blip?
- How did you notice? Users, support tickets, monitoring, or by accident?
- How long did the stale value stick around, and how hard was it to track down?
- What did you change afterwards? Shorter TTLs, versioned keys, invalidating from the DB change stream, or something else?
- And if you've never had this problem, what do you do that avoids it?