Bird
0
0

Which of the following is the correct syntax to set the cache driver to Redis in config/cache.php?

easy📝 Syntax Q3 of 15
Laravel - Configuration and Environment
Which of the following is the correct syntax to set the cache driver to Redis in config/cache.php?
A'default' => 'redis',
B'driver' => 'redis',
C'cache_driver' => 'redis',
D'cache' => 'redis',
Step-by-Step Solution
Solution:
  1. Step 1: Understand Laravel cache config keys

    The main key to set the cache driver is 'default' in config/cache.php.
  2. Step 2: Verify correct syntax

    Setting 'default' => 'redis' correctly sets Redis as the cache driver.
  3. Final Answer:

    'default' => 'redis' -> Option A
  4. Quick Check:

    Cache driver key = 'default' [OK]
Quick Trick: Use 'default' key to set cache driver [OK]
Common Mistakes:
  • Using 'driver' key
  • Using 'cache_driver' key
  • Using 'cache' key

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes