Book 4 · Lesson 4.8

Redis cache warm-up

  • Run warm_redis after Postgres insert
  • Explain HSET, INCR, PUBLISH keys
  • Connect to metrics summary latest_by_source

Prerequisites: 4.7 · 2.6

Postgres is durable; Redis is fast + live.

After persist_event, analyzer calls warm_redis:

KeyPurpose
team_radar:latest_by_sourceHash — latest event id per source
team_radar:count:{source}Counter
team_radar:eventsPub/sub channel for SSE

RedisCacheWarmup — click Warm on each key.

Teach-back prompt

Why warm Redis if Postgres already has the row?

Redis warm after insert

Lesson 4.8 check

1. Redis PUBLISH channel for live events…