Redis patterns, one picture at a time
Five short foundations — commands, key names and expiry, the single thread, a Node.js + Express project, lists and sets — then fifteen real use cases. Every diagram has a ▶ Play button and every chapter has a Redis you can type into.
Foundations
- 01 Hello Redis: keys, values, first commands One dictionary in RAM · SET, GET, MSET, INCR, DEL · reading replies · a live CLI
- 02 Key names, patterns, and expiry user:42:cart naming · KEYS vs SCAN · TTL, PERSIST · how lazy and active expiry really work
- 03 Atomicity and the single thread One queue, one executor · the lost update race · MULTI/EXEC, WATCH, Lua, pipelines
- 04 Redis in a Node.js app node-redis client · cache a slow route · invalidate on write · refresh in background · Express rate-limit middleware by IP
- 05 Lists and sets in depth Head, tail, indexes · stack, queue, capped feed · SINTER, SUNION, SDIFF · which structure to pick