2015-07-08 03:34:58 -04:00
|
|
|
<?php
|
|
|
|
|
2018-11-02 18:11:14 -04:00
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
2015-07-08 03:34:58 -04:00
|
|
|
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' => 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.
|
|
|
|
|
|
2020-12-09 16:00:01 -05:00
|
|
|
| Supported drivers: "apc", "array", "database", "file",
|
2021-08-03 17:15:07 -04:00
|
|
|
| "memcached", "redis", "dynamodb", "octane", "null"
|
2020-12-09 16:00:01 -05:00
|
|
|
|
|
2015-07-08 03:34:58 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
'stores' => [
|
|
|
|
|
|
|
|
'apc' => [
|
|
|
|
'driver' => 'apc',
|
|
|
|
],
|
|
|
|
|
|
|
|
'array' => [
|
|
|
|
'driver' => 'array',
|
2020-04-23 22:17:13 -04:00
|
|
|
'serialize' => false,
|
2015-07-08 03:34:58 -04:00
|
|
|
],
|
|
|
|
|
|
|
|
'database' => [
|
|
|
|
'driver' => 'database',
|
2016-08-19 16:38:49 -04:00
|
|
|
'table' => 'cache',
|
2015-07-08 03:34:58 -04:00
|
|
|
'connection' => null,
|
2021-04-20 17:11:13 -04:00
|
|
|
'lock_connection' => null,
|
2015-07-08 03:34:58 -04:00
|
|
|
],
|
|
|
|
|
|
|
|
'file' => [
|
|
|
|
'driver' => 'file',
|
2017-01-26 19:17:37 -05:00
|
|
|
'path' => storage_path('framework/cache/data'),
|
2015-07-08 03:34:58 -04:00
|
|
|
],
|
|
|
|
|
|
|
|
'memcached' => [
|
2016-08-19 16:38:49 -04:00
|
|
|
'driver' => 'memcached',
|
|
|
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
2016-08-24 12:09:21 -04:00
|
|
|
'sasl' => [
|
2016-08-19 16:38:49 -04:00
|
|
|
env('MEMCACHED_USERNAME'),
|
|
|
|
env('MEMCACHED_PASSWORD'),
|
|
|
|
],
|
2016-08-24 12:09:21 -04:00
|
|
|
'options' => [
|
2019-03-19 17:40:13 -04:00
|
|
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
2016-08-19 16:38:49 -04:00
|
|
|
],
|
2015-07-08 03:34:58 -04:00
|
|
|
'servers' => [
|
|
|
|
[
|
2016-08-19 16:38:49 -04:00
|
|
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
|
|
|
'port' => env('MEMCACHED_PORT', 11211),
|
|
|
|
'weight' => 100,
|
2015-07-08 03:34:58 -04:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'redis' => [
|
|
|
|
'driver' => 'redis',
|
2018-11-02 18:11:14 -04:00
|
|
|
'connection' => 'cache',
|
2021-04-20 17:11:13 -04:00
|
|
|
'lock_connection' => 'default',
|
2015-07-08 03:34:58 -04:00
|
|
|
],
|
|
|
|
|
2019-03-19 17:40:13 -04:00
|
|
|
'dynamodb' => [
|
|
|
|
'driver' => 'dynamodb',
|
|
|
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
|
|
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
|
|
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
|
|
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
2019-09-06 01:32:11 -04:00
|
|
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
2019-03-19 17:40:13 -04:00
|
|
|
],
|
|
|
|
|
2021-08-03 17:15:07 -04:00
|
|
|
'octane' => [
|
|
|
|
'driver' => 'octane',
|
|
|
|
],
|
|
|
|
|
2015-07-08 03:34:58 -04: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.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2018-11-02 18:11:14 -04:00
|
|
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'hypothetical'), '_').'_cache'),
|
2015-07-08 03:34:58 -04:00
|
|
|
|
|
|
|
];
|