
Caching Strategies and Invalidation
Field notes on caches that lied: the four caching patterns, TTL guidance by data type, and why one hot key going stale can bring your database down with it.
Tag

Field notes on caches that lied: the four caching patterns, TTL guidance by data type, and why one hot key going stale can bring your database down with it.

pgrust just passed 100% of Postgres's 46,000+ regression tests — 450K lines of Rust written by eight parallel AI agents in 12 weeks. Is it production-ready?

Just use Postgres for everything: in July 2026 one instance absorbs caching, queues, full-text search and vectors, erasing the tax of seven systems.

Drizzle vs Prisma in 2026: Drizzle ships a ~7.4 KB bundle while Prisma 7 swaps its Rust engine for WASM. Bundle size, edge cold starts and a decision table.

PgBouncer pooling boosts performance but can silently break RLS tenant isolation in transaction mode; here's the SET LOCAL fix and CVE-2026-6664 patch.

One ALTER TABLE locked a production table for minutes. Here's the expand-contract pattern, batched backfills, and CREATE INDEX CONCURRENTLY done right.

A list endpoint was firing 400 queries and taking 6 seconds to load. Here's how we detected the N+1 problem and cut it down to 2 queries with eager loading.

A payment request timed out, the mobile app retried automatically, and the customer got charged twice. Here's how idempotency keys and UPSERT prevent that.

Database indexing explained with real PostgreSQL 18 examples: how B-trees work, EXPLAIN ANALYZE proof, index types compared, and how skip scan changes the leftmost-prefix rule.