]> BookStack Code Mirror - bookstack/blob - app/Config/broadcasting.php
Reverted shift change to old migration
[bookstack] / app / Config / broadcasting.php
1 <?php
2
3 /**
4  * Caching configuration options.
5  *
6  * Changes to these config files are not supported by BookStack and may break upon updates.
7  * Configuration should be altered via the `.env` file or environment variables.
8  * Do not edit this file unless you're happy to maintain any changes yourself.
9  */
10
11 // MEMCACHED - Split out configuration into an array
12 if (env('CACHE_DRIVER') === 'memcached') {
13     $memcachedServerKeys = ['host', 'port', 'weight'];
14     $memcachedServers = explode(',', trim(env('MEMCACHED_SERVERS', '127.0.0.1:11211:100'), ','));
15     foreach ($memcachedServers as $index => $memcachedServer) {
16         $memcachedServerDetails = explode(':', $memcachedServer);
17         if (count($memcachedServerDetails) < 2) {
18             $memcachedServerDetails[] = '11211';
19         }
20         if (count($memcachedServerDetails) < 3) {
21             $memcachedServerDetails[] = '100';
22         }
23         $memcachedServers[$index] = array_combine($memcachedServerKeys, $memcachedServerDetails);
24     }
25 }
26
27 return [
28
29     // Default cache store to use
30     // Can be overridden at cache call-time
31     'default' => env('CACHE_DRIVER', 'file'),
32
33     // Available caches stores
34     'stores' => [
35
36         'apc' => [
37             'driver' => 'apc',
38         ],
39
40         'array' => [
41             'driver'    => 'array',
42             'serialize' => false,
43         ],
44
45         'database' => [
46             'driver'          => 'database',
47             'table'           => 'cache',
48             'connection'      => null,
49             'lock_connection' => null,
50         ],
51
52         'file' => [
53             'driver' => 'file',
54             'path'   => storage_path('framework/cache'),
55         ],
56
57         'memcached' => [
58             'driver'  => 'memcached',
59             'servers' => env('CACHE_DRIVER') === 'memcached' ? $memcachedServers : [],
60             'options' => [],
61         ],
62
63         'redis' => [
64             'driver'          => 'redis',
65             'connection'      => 'default',
66             'lock_connection' => 'default',
67         ],
68
69         'octane' => [
70             'driver' => 'octane',
71         ],
72
73     ],
74
75     // Cache key prefix
76     // Used to prevent collisions in shared cache systems.
77     'prefix' => env('CACHE_PREFIX', 'bookstack_cache'),
78
79 ];