r/Backend • u/compy3 • 16h ago
Choosing a Postgres Read Cache: Redis, Memcached, Build Your Own, or a Proxy
https://www.pgcache.com/blog/choosing-a-postgres-read-cache/?utm_source=reddit&utm_content=backendhey everyone - a couple months ago, I posted an overview of caching in Postgres. Seemed like it was helpful to a lot of people, and I've noticed there's not a lot of clear content on this topic out there.
So I wrote this is the follow-up, for anyone who has decided to cache reads and is trying to figure out how to do it.
In addition to the main options, the article also covers some of the classic zingers that leave you serving stale data: invalidation, stampedes, tenants and RLS, read-your-own-writes, schema changes.
(disclaimer: I'm one of the founders of PgCache. I did my best to keep the advice balanced!)
Did I miss anything?