Goal
Make performance work evidence-driven.
This phase introduces caching after the app has endpoints worth measuring. The learner should see why caching is useful and why it creates new failure modes.
Build
- Cache hot community metadata.
- Cache selected feed responses with TTLs.
- Add rate limits for sensitive actions.
- Run simple load tests and compare before/after results.
Concepts
- Redis or Valkey.
- Cache keys, TTLs, and invalidation.
- Connection pooling.
- Load testing and slow endpoint measurement.
Prompt stub
Expansion prompt
Identify one endpoint that is safe to cache.
Add Redis or Valkey caching with a clear TTL.
Explain what can go stale and how invalidation works.
Add a simple before/after measurement.Done means
- The app caches a small number of hot reads.
- Stale data behavior is understood and documented.
- Rate limits protect expensive or abusive actions.
- The learner knows why caching is not free simplicity.