2017-11-03 05:26:07 +00:00
|
|
|
<?php
|
|
|
|
|
2020-01-11 02:36:11 +00:00
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
2017-11-03 05:26:07 +00:00
|
|
|
return [
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Default Cache Store
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-07-04 05:03:11 +00:00
|
|
|
| This option controls the default cache store that will be used by the
|
|
|
|
| framework. This connection is utilized if another isn't explicitly
|
|
|
|
| specified when running a cache operation inside the application.
|
2017-11-03 05:26:07 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-07-04 05:03:11 +00:00
|
|
|
'default' => env('CACHE_STORE', 'database'),
|
2017-11-03 05:26:07 +00: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.
|
|
|
|
|
|
2024-07-04 05:03:11 +00:00
|
|
|
| Supported drivers: "array", "database", "file", "memcached",
|
|
|
|
| "redis", "dynamodb", "octane", "null"
|
|
|
|
|
|
2017-11-03 05:26:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
'stores' => [
|
|
|
|
|
|
|
|
'array' => [
|
|
|
|
'driver' => 'array',
|
2024-07-04 05:03:11 +00:00
|
|
|
'serialize' => false,
|
2017-11-03 05:26:07 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'database' => [
|
|
|
|
'driver' => 'database',
|
2024-07-04 05:03:11 +00:00
|
|
|
'connection' => env('DB_CACHE_CONNECTION'),
|
|
|
|
'table' => env('DB_CACHE_TABLE', 'cache'),
|
|
|
|
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
|
|
|
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
|
2017-11-03 05:26:07 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'file' => [
|
|
|
|
'driver' => 'file',
|
|
|
|
'path' => storage_path('framework/cache/data'),
|
2024-07-04 05:03:11 +00:00
|
|
|
'lock_path' => storage_path('framework/cache/data'),
|
2017-11-03 05:26:07 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'memcached' => [
|
|
|
|
'driver' => 'memcached',
|
|
|
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
|
|
|
'sasl' => [
|
|
|
|
env('MEMCACHED_USERNAME'),
|
|
|
|
env('MEMCACHED_PASSWORD'),
|
|
|
|
],
|
|
|
|
'options' => [
|
2020-01-11 02:36:11 +00:00
|
|
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
2017-11-03 05:26:07 +00:00
|
|
|
],
|
|
|
|
'servers' => [
|
|
|
|
[
|
|
|
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
|
|
|
'port' => env('MEMCACHED_PORT', 11211),
|
|
|
|
'weight' => 100,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'redis' => [
|
|
|
|
'driver' => 'redis',
|
2024-07-04 05:03:11 +00:00
|
|
|
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
|
|
|
|
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
|
2020-01-11 02:36:11 +00: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'),
|
|
|
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
2017-11-03 05:26:07 +00:00
|
|
|
],
|
|
|
|
|
2024-07-04 05:03:11 +00:00
|
|
|
'octane' => [
|
|
|
|
'driver' => 'octane',
|
|
|
|
],
|
|
|
|
|
2017-11-03 05:26:07 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Cache Key Prefix
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-07-04 05:03:11 +00:00
|
|
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
|
|
|
| stores, there might be other applications using the same cache. For
|
|
|
|
| that reason, you may prefix every cache key to avoid collisions.
|
2017-11-03 05:26:07 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-07-04 05:03:11 +00:00
|
|
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
2017-11-03 05:26:07 +00:00
|
|
|
|
|
|
|
];
|