Bird
0
0

Which attribute of @CacheEvict specifies the cache(s) to clear?

easy📝 Conceptual Q2 of 15
Spring Boot - Caching
Which attribute of @CacheEvict specifies the cache(s) to clear?
Akey
BkeyGenerator
CcacheNames
Dcondition
Step-by-Step Solution
Solution:
  1. Step 1: Identify the attribute for cache names

    @CacheEvict uses cacheNames to specify caches.
  2. Step 2: Choose the preferred attribute

    cacheNames is the explicit attribute to specify caches.
  3. Final Answer:

    cacheNames -> Option C
  4. Quick Check:

    Cache to clear = cacheNames [OK]
Quick Trick: Use cacheNames to specify which cache to evict [OK]
Common Mistakes:
  • Using key to specify cache names
  • Confusing condition with cache selection
  • Using keyGenerator to specify cache names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes