X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/80865b30a5d6a82e86d21e272ae58977d4430a64..refs/pull/1462/head:/config/cache.php diff --git a/config/cache.php b/config/cache.php index 076a0299f..43f420457 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,44 +1,32 @@ $memcachedServer) { $memcachedServerDetails = explode(':', $memcachedServer); - $components = count($memcachedServerDetails); - if ($components < 2) $memcachedServerDetails[] = '11211'; - if ($components < 3) $memcachedServerDetails[] = '100'; + if (count($memcachedServerDetails) < 2) $memcachedServerDetails[] = '11211'; + if (count($memcachedServerDetails) < 3) $memcachedServerDetails[] = '100'; $memcachedServers[$index] = array_combine($memcachedServerKeys, $memcachedServerDetails); } } return [ - /* - |-------------------------------------------------------------------------- - | Default Cache Store - |-------------------------------------------------------------------------- - | - | This option controls the default cache connection that gets used while - | using this caching library. This connection is used when another is - | not explicitly specified when executing a given caching function. - | - */ - + // Default cache store to use + // Can be overridden at cache call-time 'default' => env('CACHE_DRIVER', 'file'), - /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - */ - + // Available caches stores 'stores' => [ 'apc' => [ @@ -72,17 +60,8 @@ return [ ], - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. - | - */ - - 'prefix' => 'laravel', + // Cache key prefix + // Used to prevent collisions in shared cache systems. + 'prefix' => env('CACHE_PREFIX', 'bookstack'), ];