Chapter 6 Assignment

Cache + email + job — a real use of three batteries

The brief

Build a small feature using three batteries: when a new Order is created, (1) cache the order total in Redis with a 5-min TTL, (2) enqueue a job that sends a confirmation email via Resend, (3) the job worker actually sends it. Test the whole loop with a real Resend test key.

You've completed this when

  • Order create returns under 50ms (because email is async)
  • Email lands in your Resend dashboard
  • GET on the order pulls from Redis (you can see the X-Cache header)
  • You can explain WHERE in the code each battery is wired

Worked through every criterion?

Push your code to GitHub, paste the link in your notes.md, and move on.

Continue to ch.7: Architecture Modes