redis is not a database no matter how many times you SET something
yes it has persistence. yes you can technically store data in it and have it survive a restart. no that does not make it your source of truth and im tired of pretending the AOF/RDB thing makes this an actual debate
watched a team lose a few hours of user sessions last year because someone decided redis was the session store, no postgres behind it, nothing. box got restarted during a routine deploy, the snapshot was however many minutes stale, everyone got logged out mid-checkout. the postmortem treated it like some freak event and not the completely predictable result of using an in-memory cache as your only copy of something you cared about
the thing is redis is genuinely incredible at what its for. caching, pub/sub, rate limiting, ephemeral counters, a leaderboard, a lock. its so good at being fast that people start reaching for it for everything and forget the fast comes from it living in memory, which is the exact property that makes it a bad place to keep the only copy of anything
and i get why it happens. its right there, its already in the stack, adding a real write to postgres feels like more work than just SET and moving on. but durability isnt a feature you bolt on later when it bites you, its the whole reason databases are annoying to work with in the first place. the annoying parts are the point
persistence is not durability. a snapshot every few minutes is not a transaction log. eventual-on-a-good-day is not the same as committed
use it for what its great at. put the stuff you cant lose somewhere that was built to not lose it. this isnt even a hot take its just what the docs have been saying the whole time and somehow we;re still here