Aucune description

cache.php 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. use Illuminate\Support\Str;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Default Cache Store
  7. |--------------------------------------------------------------------------
  8. |
  9. | This option controls the default cache connection that gets used while
  10. | using this caching library. This connection is used when another is
  11. | not explicitly specified when executing a given caching function.
  12. |
  13. */
  14. 'default' => env('CACHE_DRIVER', 'file'),
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Cache Stores
  18. |--------------------------------------------------------------------------
  19. |
  20. | Here you may define all of the cache "stores" for your application as
  21. | well as their drivers. You may even define multiple stores for the
  22. | same cache driver to group types of items stored in your caches.
  23. |
  24. | Supported drivers: "apc", "array", "database", "file",
  25. | "memcached", "redis", "dynamodb", "octane", "null"
  26. |
  27. */
  28. 'stores' => [
  29. 'apc' => [
  30. 'driver' => 'apc',
  31. ],
  32. 'array' => [
  33. 'driver' => 'array',
  34. 'serialize' => false,
  35. ],
  36. 'database' => [
  37. 'driver' => 'database',
  38. 'table' => 'cache',
  39. 'connection' => null,
  40. 'lock_connection' => null,
  41. ],
  42. 'file' => [
  43. 'driver' => 'file',
  44. 'path' => storage_path('framework/cache/data'),
  45. ],
  46. 'memcached' => [
  47. 'driver' => 'memcached',
  48. 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
  49. 'sasl' => [
  50. env('MEMCACHED_USERNAME'),
  51. env('MEMCACHED_PASSWORD'),
  52. ],
  53. 'options' => [
  54. // Memcached::OPT_CONNECT_TIMEOUT => 2000,
  55. ],
  56. 'servers' => [
  57. [
  58. 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
  59. 'port' => env('MEMCACHED_PORT', 11211),
  60. 'weight' => 100,
  61. ],
  62. ],
  63. ],
  64. 'redis' => [
  65. 'driver' => 'redis',
  66. 'connection' => 'cache',
  67. 'lock_connection' => 'default',
  68. ],
  69. 'dynamodb' => [
  70. 'driver' => 'dynamodb',
  71. 'key' => env('AWS_ACCESS_KEY_ID'),
  72. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  73. 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
  74. 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
  75. 'endpoint' => env('DYNAMODB_ENDPOINT'),
  76. ],
  77. 'octane' => [
  78. 'driver' => 'octane',
  79. ],
  80. ],
  81. /*
  82. |--------------------------------------------------------------------------
  83. | Cache Key Prefix
  84. |--------------------------------------------------------------------------
  85. |
  86. | When utilizing a RAM based store such as APC or Memcached, there might
  87. | be other applications utilizing the same cache. So, we'll specify a
  88. | value to get prefixed to all our keys so we can avoid collisions.
  89. |
  90. */
  91. 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
  92. ];