03Service-layer caching

Redis Caching with Spring Boot

Redis reduces repeated database reads, and writes invalidate affected cache entries.

Wizard directory with a cache inspector showing lookup results and invalidation controls.
Concept interface

How it works

  • The service caches individual wizard records by ID and wizard lists by house ID.
  • Writes invalidate the affected cache entries so subsequent reads can fetch fresh data.
  • Testcontainers exercises cache hits, invalidation, updates, and read consistency. Flyway seeds the database.

Technology stack

JavaSpring BootRedisMySQLFlywayTestcontainers