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);
18 |--------------------------------------------------------------------------
20 |--------------------------------------------------------------------------
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.
28 'default' => env('CACHE_DRIVER', 'file'),
31 |--------------------------------------------------------------------------
33 |--------------------------------------------------------------------------
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.
52 'driver' => 'database',
59 'path' => storage_path('framework/cache'),
63 'driver' => 'memcached',
64 'servers' => env('CACHE_DRIVER') === 'memcached' ? $memcachedServers : [],
69 'connection' => 'default',
75 |--------------------------------------------------------------------------
77 |--------------------------------------------------------------------------
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.
85 'prefix' => env('CACHE_PREFIX', 'bookstack'),