]> BookStack Code Mirror - bookstack/blob - app/Config/cache.php
Fixed 'interaction_required' response for azure
[bookstack] / app / Config / cache.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         ],
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'),
53         ],
54
55         'memcached' => [
56             'driver'  => 'memcached',
57             'servers' => env('CACHE_DRIVER') === 'memcached' ? $memcachedServers : [],
58         ],
59
60         'redis' => [
61             'driver' => 'redis',
62             'connection' => 'default',
63         ],
64
65     ],
66
67     // Cache key prefix
68     // Used to prevent collisions in shared cache systems.
69     'prefix' => env('CACHE_PREFIX', 'bookstack_cache'),
70
71 ];