1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
return [ |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
|-------------------------------------------------------------------------- |
7
|
|
|
| Default Cache Store |
8
|
|
|
|-------------------------------------------------------------------------- |
9
|
|
|
| |
10
|
|
|
| This option controls the default cache connection that gets used while |
11
|
|
|
| using this caching library. This connection is used when another is |
12
|
|
|
| not explicitly specified when executing a given caching function. |
13
|
|
|
| |
14
|
|
|
| Supported: "apc", "array", "database", "file", "memcached", "redis" |
15
|
|
|
| |
16
|
|
|
*/ |
17
|
|
|
|
18
|
|
|
'default' => env('CACHE_DRIVER', 'file'), |
19
|
|
|
|
20
|
|
|
/* |
21
|
|
|
|-------------------------------------------------------------------------- |
22
|
|
|
| Cache Stores |
23
|
|
|
|-------------------------------------------------------------------------- |
24
|
|
|
| |
25
|
|
|
| Here you may define all of the cache "stores" for your application as |
26
|
|
|
| well as their drivers. You may even define multiple stores for the |
27
|
|
|
| same cache driver to group types of items stored in your caches. |
28
|
|
|
| |
29
|
|
|
*/ |
30
|
|
|
|
31
|
|
|
'stores' => [ |
32
|
|
|
|
33
|
|
|
'apc' => [ |
34
|
|
|
'driver' => 'apc', |
35
|
|
|
], |
36
|
|
|
|
37
|
|
|
'array' => [ |
38
|
|
|
'driver' => 'array', |
39
|
|
|
], |
40
|
|
|
|
41
|
|
|
'database' => [ |
42
|
|
|
'driver' => 'database', |
43
|
|
|
'table' => 'cache', |
44
|
|
|
'connection' => null, |
45
|
|
|
], |
46
|
|
|
|
47
|
|
|
'file' => [ |
48
|
|
|
'driver' => 'file', |
49
|
|
|
'path' => storage_path('framework/cache'), |
50
|
|
|
], |
51
|
|
|
|
52
|
|
|
'memcached' => [ |
53
|
|
|
'driver' => 'memcached', |
54
|
|
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), |
55
|
|
|
'sasl' => [ |
56
|
|
|
env('MEMCACHED_USERNAME'), |
57
|
|
|
env('MEMCACHED_PASSWORD'), |
58
|
|
|
], |
59
|
|
|
'options' => [ |
60
|
|
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000, |
|
|
|
|
61
|
|
|
], |
62
|
|
|
'servers' => [ |
63
|
|
|
[ |
64
|
|
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'), |
65
|
|
|
'port' => env('MEMCACHED_PORT', 11211), |
66
|
|
|
'weight' => 100, |
67
|
|
|
], |
68
|
|
|
], |
69
|
|
|
], |
70
|
|
|
|
71
|
|
|
'redis' => [ |
72
|
|
|
'driver' => 'redis', |
73
|
|
|
'connection' => 'default', |
74
|
|
|
], |
75
|
|
|
|
76
|
|
|
], |
77
|
|
|
|
78
|
|
|
/* |
79
|
|
|
|-------------------------------------------------------------------------- |
80
|
|
|
| Cache Key Prefix |
81
|
|
|
|-------------------------------------------------------------------------- |
82
|
|
|
| |
83
|
|
|
| When utilizing a RAM based store such as APC or Memcached, there might |
84
|
|
|
| be other applications utilizing the same cache. So, we'll specify a |
85
|
|
|
| value to get prefixed to all our keys so we can avoid collisions. |
86
|
|
|
| |
87
|
|
|
*/ |
88
|
|
|
|
89
|
|
|
'prefix' => 'laravel', |
90
|
|
|
|
91
|
|
|
]; |
92
|
|
|
|
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.