🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Spring Boot Caching: all 10 questions

Quiz: Spring Boot Caching · Question 2 of 10

Which annotation always runs the method and stores its result in the cache?

Which annotation always runs the method and stores its result in the cache?

  1. A.@Cacheable
  2. B.@CachePut
  3. C.@CacheEvict
  4. D.@EnableCaching
Answer & explanation

Correct answer: @CachePut

@Cacheable skips the method on a hit; @CachePut always runs it and refreshes the entry.

Can you get the rest right without peeking?

Take the timed Quiz: Spring Boot Caching quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →