Next.js Data Fetching — fetch, cache, revalidate
Master fetch strategies, caching mechanisms, and revalidation in Next.js 15.
16 articles
Master fetch strategies, caching mechanisms, and revalidation in Next.js 15.
Master Redis caching in 2026: cache strategies (cache-aside, write-through), rate limiting, session storage, pub/sub, sorted sets, and Upstash Redis for serverless deployments.
Users see stale prices. Admins update settings but the old value is served for 10 minutes. You delete a record but it keeps appearing. Cache invalidation is famously hard — and most implementations have subtle bugs that serve wrong data long after the source changed.
Cache stampede (a.k.a. thundering herd on TTL expiry) is one of the most dangerous failure modes in high-traffic systems. The moment your cache key expires, hundreds of simultaneous requests hammer your database — often killing it. Here''s how it happens, and exactly how to fix it.
Master read-after-write consistency, version vectors, causal consistency tokens, and UI patterns for systems where data is temporarily stale.
User updates their profile. Refreshes the page — old data shows. They update again. Still old data. They''re furious. Your system is eventually consistent — but nobody told the user (or the developer who designed the UI). Here''s how to manage consistency expectations in distributed systems.
Master HTTP caching layers from browser to CDN. Learn Cache-Control directives, ETag validation, and production strategies for cache consistency.
Cut LLM costs and latency with exact match caching, semantic caching, embedding similarity, Redis implementation, cost savings, and TTL strategies.
Implement exact-match and semantic caching with Redis to dramatically reduce LLM API calls, improving latency and cutting costs by 60% through intelligent cache invalidation.
Understand Redis Cluster architecture, consistent hashing, CROSSSLOT errors, hot slot detection, replication, and monitoring for production deployments.
Redis is full. Instead of failing gracefully, it starts silently evicting your most important cache keys — session tokens, rate limit counters, distributed locks. Your app behaves mysteriously until you realize Redis has been quietly deleting data. Here''s how to tame Redis eviction.
Redis evolved from a cache into a multi-model database: vector storage, time series, JSON, full-text search. Learn when to use Redis and modern patterns for 2026.
Master Redis patterns: cache-aside vs write-through caching, distributed locks with Lua, sliding window rate limiters, pub/sub, sorted sets for leaderboards, Redis Streams, and memory management.
Implement semantic caching to reduce LLM API costs by 40-60%, handle similarity thresholds, TTLs, and cache invalidation in production.
Your marketing team runs a campaign. It goes viral. Traffic spikes 50x in 10 minutes. Your servers crash. This is the happiest disaster in tech — and it''s entirely preventable. Here''s how to build systems that survive sudden viral traffic spikes.
Most HTTP clients give you fetch. reixo gives you Result<T,E> returns, automatic retry with jitter, circuit breakers, request deduplication, LRU caching, GraphQL support, WebSocket/SSE, OpenTelemetry tracing, and a fluent builder API — all in one TypeScript-first package.