← All topics
Quiz: Spring Boot Caching: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. In the cache-aside pattern, what happens on a cache miss?
- Q2. Which annotation always runs the method and stores its result in the cache?
- Q3. What does this print? (code)
- Q4. A course title is updated in the database but the method that updates it has no cache annotation. What do users see?
- Q5. Why is @Cacheable ignored when findById is called from another method of the same class?
- Q6. @Cacheable(cacheNames = "courses", key = "city") is on findCourses(String city, int page). What goes wrong?
- Q7. What is the main limitation of Spring Boot's default simple cache?
- Q8. An app runs on three servers and must show the same cached data everywhere. Which provider fits best?
- Q9. What does this print? (code)
- Q10. Which data is the WORST candidate for caching?