2013-01-11 15:14:07 -06:00
|
|
|
<?php
|
|
|
|
|
2018-09-14 10:38:02 -05:00
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
2014-08-24 14:03:58 -05:00
|
|
|
return [
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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.
|
|
|
|
|
|
|
|
|
*/
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'default' => env('CACHE_DRIVER', 'file'),
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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.
|
|
|
|
|
|
2020-11-12 17:25:54 +03:30
|
|
|
| Supported drivers: "apc", "array", "database", "file",
|
|
|
|
| "memcached", "redis", "dynamodb"
|
|
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
*/
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'stores' => [
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'apc' => [
|
2015-06-01 15:43:37 +01:00
|
|
|
'driver' => 'apc',
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'array' => [
|
2015-06-01 15:43:37 +01:00
|
|
|
'driver' => 'array',
|
2020-03-04 15:04:39 +01:00
|
|
|
'serialize' => false,
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'database' => [
|
|
|
|
'driver' => 'database',
|
2016-03-01 08:23:00 -06:00
|
|
|
'table' => 'cache',
|
2015-02-22 20:47:03 -06:00
|
|
|
'connection' => null,
|
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'file' => [
|
|
|
|
'driver' => 'file',
|
2016-12-31 21:25:17 -06:00
|
|
|
'path' => storage_path('framework/cache/data'),
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'memcached' => [
|
2016-03-01 08:23:00 -06:00
|
|
|
'driver' => 'memcached',
|
2016-04-29 17:45:51 +01:00
|
|
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
2016-08-23 22:39:29 -05:00
|
|
|
'sasl' => [
|
2016-04-29 17:45:51 +01:00
|
|
|
env('MEMCACHED_USERNAME'),
|
|
|
|
env('MEMCACHED_PASSWORD'),
|
|
|
|
],
|
2016-08-23 22:39:29 -05:00
|
|
|
'options' => [
|
2019-01-09 11:21:41 +08:00
|
|
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
2016-04-29 17:45:51 +01:00
|
|
|
],
|
2015-02-22 20:47:03 -06:00
|
|
|
'servers' => [
|
|
|
|
[
|
2016-01-28 15:38:52 +00:00
|
|
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
|
|
|
'port' => env('MEMCACHED_PORT', 11211),
|
|
|
|
'weight' => 100,
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
2014-12-16 17:44:56 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'redis' => [
|
|
|
|
'driver' => 'redis',
|
2018-05-23 15:24:27 +02:00
|
|
|
'connection' => 'cache',
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2019-01-10 15:18:58 -06:00
|
|
|
'dynamodb' => [
|
|
|
|
'driver' => 'dynamodb',
|
|
|
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
|
|
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
2019-02-27 14:05:01 +04:00
|
|
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
2019-01-10 15:18:58 -06:00
|
|
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
2019-05-29 16:12:30 +02:00
|
|
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
2019-01-10 15:18:58 -06:00
|
|
|
],
|
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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.
|
|
|
|
|
|
|
|
|
*/
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2018-09-14 10:38:31 -05:00
|
|
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2014-08-24 14:03:58 -05:00
|
|
|
];
|