🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. In the cache-aside pattern, what happens on a cache miss?
  2. Q2. Which annotation always runs the method and stores its result in the cache?
  3. Q3. What does this print? (code)
  4. Q4. A course title is updated in the database but the method that updates it has no cache annotation. What do users see?
  5. Q5. Why is @Cacheable ignored when findById is called from another method of the same class?
  6. Q6. @Cacheable(cacheNames = "courses", key = "city") is on findCourses(String city, int page). What goes wrong?
  7. Q7. What is the main limitation of Spring Boot's default simple cache?
  8. Q8. An app runs on three servers and must show the same cached data everywhere. Which provider fits best?
  9. Q9. What does this print? (code)
  10. Q10. Which data is the WORST candidate for caching?