1
|
<?php
|
2
|
|
3
|
use Illuminate\Support\Str;
|
4
|
|
5
|
return [
|
6
|
|
7
|
/*
|
8
|
|--------------------------------------------------------------------------
|
9
|
| Default Cache Store
|
10
|
|--------------------------------------------------------------------------
|
11
|
|
|
12
|
| This option controls the default cache connection that gets used while
|
13
|
| using this caching library. This connection is used when another is
|
14
|
| not explicitly specified when executing a given caching function.
|
15
|
|
|
16
|
| Supported: "apc", "array", "database", "file",
|
17
|
| "memcached", "redis", "dynamodb"
|
18
|
|
|
19
|
*/
|
20
|
|
21
|
'default' => env('CACHE_DRIVER', 'file'),
|
22
|
|
23
|
/*
|
24
|
|--------------------------------------------------------------------------
|
25
|
| Cache Stores
|
26
|
|--------------------------------------------------------------------------
|
27
|
|
|
28
|
| Here you may define all of the cache "stores" for your application as
|
29
|
| well as their drivers. You may even define multiple stores for the
|
30
|
| same cache driver to group types of items stored in your caches.
|
31
|
|
|
32
|
*/
|
33
|
|
34
|
'stores' => [
|
35
|
|
36
|
'apc' => [
|
37
|
'driver' => 'apc',
|
38
|
],
|
39
|
|
40
|
'array' => [
|
41
|
'driver' => 'array',
|
42
|
],
|
43
|
|
44
|
'database' => [
|
45
|
'driver' => 'database',
|
46
|
'table' => 'cache',
|
47
|
'connection' => null,
|
48
|
],
|
49
|
|
50
|
'file' => [
|
51
|
'driver' => 'file',
|
52
|
'path' => storage_path('framework/cache/data'),
|
53
|
],
|
54
|
|
55
|
'memcached' => [
|
56
|
'driver' => 'memcached',
|
57
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
58
|
'sasl' => [
|
59
|
env('MEMCACHED_USERNAME'),
|
60
|
env('MEMCACHED_PASSWORD'),
|
61
|
],
|
62
|
'options' => [
|
63
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
64
|
],
|
65
|
'servers' => [
|
66
|
[
|
67
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
68
|
'port' => env('MEMCACHED_PORT', 11211),
|
69
|
'weight' => 100,
|
70
|
],
|
71
|
],
|
72
|
],
|
73
|
|
74
|
'redis' => [
|
75
|
'driver' => 'redis',
|
76
|
'connection' => 'cache',
|
77
|
],
|
78
|
|
79
|
'dynamodb' => [
|
80
|
'driver' => 'dynamodb',
|
81
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
82
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
83
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
84
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
85
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
86
|
],
|
87
|
|
88
|
],
|
89
|
|
90
|
/*
|
91
|
|--------------------------------------------------------------------------
|
92
|
| Cache Key Prefix
|
93
|
|--------------------------------------------------------------------------
|
94
|
|
|
95
|
| When utilizing a RAM based store such as APC or Memcached, there might
|
96
|
| be other applications utilizing the same cache. So, we'll specify a
|
97
|
| value to get prefixed to all our keys so we can avoid collisions.
|
98
|
|
|
99
|
*/
|
100
|
|
101
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
|
102
|
|
103
|
];
|