Bird
0
0

Given this snippet from config/cache.php:

medium📝 component behavior Q13 of 15
Laravel - Configuration and Environment
Given this snippet from config/cache.php:
'stores' => [
    'file' => [
        'driver' => 'file',
        'path' => storage_path('framework/cache/data'),
    ],
    'redis' => [
        'driver' => 'redis',
        'connection' => 'cache',
    ],
],
'default' => 'redis',
What cache store will Laravel use by default?
Aarray
Bfile
Cdatabase
Dredis
Step-by-Step Solution
Solution:
  1. Step 1: Identify the 'default' cache driver

    The config sets 'default' => 'redis', so Redis is the default store.
  2. Step 2: Confirm Redis store exists

    The 'stores' array includes a 'redis' store with proper driver and connection.
  3. Final Answer:

    redis -> Option D
  4. Quick Check:

    Default cache store = redis [OK]
Quick Trick: Default key value shows which cache store is used [OK]
Common Mistakes:
  • Assuming 'file' is default because it appears first
  • Ignoring the 'default' key value
  • Confusing store names with driver names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes