GuideIntermediate

Redis & Caching Strategies Guide

Master Redis as a professional caching layer for your FastAPI APIs. You will learn the 5 data types with real judgment (not just strings), the 3 fundamental caching patterns (cache-aside, write-through, write-behind), rate limiting with sliding windows and sorted sets, session storage that complements JWT, Pub/Sub for asynchronous events, and async integration with FastAPI using `redis.asyncio` (the official client — not the deprecated `aioredis` library). It is an intermediate guide that closes the backend infrastructure block of the Backend Python Developer path before Testing.

lessons
25
modules
5
available in
English · Spanish
certificate
Yes
access
Free
Outcomes

What you'll be able to do

  • Install and operate Redis with confidence: CLI commands, the 5 data types, redis-py
  • Implement the 3 fundamental caching patterns (cache-aside, write-through, write-behind) with judgment
  • Design TTL strategies and solve cache invalidation (manual, event-driven, version-based)
  • Prevent cache stampede with locking and probabilistic early expiration
  • Build professional rate limiting with token bucket and sliding window using sorted sets
  • Use Redis as a session store complementing JWTs for immediate revocation
  • Implement Pub/Sub for cache invalidation events and lightweight messaging
  • Integrate Redis with FastAPI async: dependency injection, middleware, connection pooling, graceful degradation
  • Monitor cache performance: hit rate, miss rate, latency with/without cache
  • Deploy a production-ready API stack with FastAPI + PostgreSQL + Redis in Docker Compose
Before you start

What you need to bring

It's for you if...

  • Backend developers who built FastAPI APIs and need to optimize performance for real traffic
  • Engineers whose PostgreSQL is saturated with repetitive queries returning the same data
  • Developers building APIs in production that need rate limiting against abuse
  • Engineers who used Redis superficially as a key-value store and want to master professional patterns
  • Teams that need session management with immediate revocation (JWT alone is not enough)

Requirements and materials

  • FastAPI intermediate: endpoints, Pydantic, dependency injection (Guides #6-7)
  • Python async/await basics
  • Familiarity with REST APIs and HTTP semantics
  • Docker basics (to run Redis in a container — no DevOps required)
  • Basic database concepts (you'll see PostgreSQL as the source of truth, but don't need to be an expert)
Content

The syllabus, module by module

Open any of them to see its lessons.

Bootcamps

Learn with live classes and reviews of your work.

In a group or 1:1, depending on your schedule.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!