Bird
0
0

What is the effect of setting spring.cache.redis.time-to-live=60000 in application.properties?

medium📝 Predict Output Q5 of 15
Spring Boot - Caching
What is the effect of setting spring.cache.redis.time-to-live=60000 in application.properties?
ACache entries never expire
BCache entries expire after 60000 minutes
CCache entries expire after 60 seconds
DCache entries expire immediately
Step-by-Step Solution
Solution:
  1. Step 1: Interpret time-to-live value

    Value 60000 is in milliseconds, so 60000 ms = 60 seconds.
  2. Step 2: Match options to TTL meaning

    Only Cache entries expire after 60 seconds correctly states 60 seconds expiration; others are incorrect durations or no expiration.
  3. Final Answer:

    Cache entries expire after 60 seconds -> Option C
  4. Quick Check:

    TTL 60000 ms = 60 seconds expiration [OK]
Quick Trick: TTL in Redis config is in milliseconds [OK]
Common Mistakes:
  • Confusing milliseconds with seconds
  • Assuming no expiration by default
  • Misreading 60000 as minutes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes