]> BookStack Code Mirror - bookstack/blob - config/cache.php
Fixed German translations for notifications
[bookstack] / config / cache.php
1 <?php
2
3 // MEMCACHED - Split out configuration into an array
4 if (env('CACHE_DRIVER') === 'memcached') {
5     $memcachedServerKeys = ['host', 'port', 'weight'];
6     $memcachedServers = explode(',', trim(env('MEMCACHED_SERVERS', '127.0.0.1:11211:100'), ','));
7     foreach ($memcachedServers as $index => $memcachedServer) {
8         $memcachedServerDetails = explode(':', $memcachedServer);
9         if (count($memcachedServerDetails) < 2) $memcachedServerDetails[] = '11211';
10         if (count($memcachedServerDetails) < 3) $memcachedServerDetails[] = '100';
11         $memcachedServers[$index] = array_combine($memcachedServerKeys, $memcachedServerDetails);
12     }
13 }
14
15 return [
16
17     /*
18     |--------------------------------------------------------------------------
19     | Default Cache Store
20     |--------------------------------------------------------------------------
21     |
22     | This option controls the default cache connection that gets used while
23     | using this caching library. This connection is used when another is
24     | not explicitly specified when executing a given caching function.
25     |
26     */
27
28     'default' => env('CACHE_DRIVER', 'file'),
29
30     /*
31     |--------------------------------------------------------------------------
32     | Cache Stores
33     |--------------------------------------------------------------------------
34     |
35     | Here you may define all of the cache "stores" for your application as
36     | well as their drivers. You may even define multiple stores for the
37     | same cache driver to group types of items stored in your caches.
38     |
39     */
40
41     'stores' => [
42
43         'apc' => [
44             'driver' => 'apc',
45         ],
46
47         'array' => [
48             'driver' => 'array',
49         ],
50
51         'database' => [
52             'driver' => 'database',
53             'table'  => 'cache',
54             'connection' => null,
55         ],
56
57         'file' => [
58             'driver' => 'file',
59             'path'   => storage_path('framework/cache'),
60         ],
61
62         'memcached' => [
63             'driver'  => 'memcached',
64             'servers' => env('CACHE_DRIVER') === 'memcached' ? $memcachedServers : [],
65         ],
66
67         'redis' => [
68             'driver' => 'redis',
69             'connection' => 'default',
70         ],
71
72     ],
73
74     /*
75     |--------------------------------------------------------------------------
76     | Cache Key Prefix
77     |--------------------------------------------------------------------------
78     |
79     | When utilizing a RAM based store such as APC or Memcached, there might
80     | be other applications utilizing the same cache. So, we'll specify a
81     | value to get prefixed to all our keys so we can avoid collisions.
82     |
83     */
84
85     'prefix' => env('CACHE_PREFIX', 'bookstack'),
86
87 ];
Morty Proxy This is a proxified and sanitized view of the page, visit original site.