← 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?
- A.@Cacheable
- B.@CachePut
- C.@CacheEvict
- 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 →