laravel/config/cache.php

103 lines
2.9 KiB
PHP
Raw Normal View History

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.
|
2019-01-10 15:18:58 -06:00
| Supported: "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
'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.
|
*/
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' => [
'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' => [
'driver' => 'array',
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',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
2019-01-09 11:21:41 +08:00
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
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'),
'region' => env('AWS_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
],
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
];