Loading lesson…
Level 1 · Apprentice0 XP
@Cacheable, eviction, TTLs and Redis, without serving stale or wrong data.
Step 1 / 6
ProblemA product page calls the catalogue service for the same product 1,000 times per second. Prices change twice a day.
← → step
Before this: Testing a Spring Boot application
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Add @Cacheable to a product lookup with Caffeine locally and Redis in a profile. Add @CacheEvict on price changes, a 10-minute TTL, and a test that proves the second call does not hit the repository.