Simple problems require simple solutions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.4 KiB

  1. <?php
  2. use Illuminate\Support\Str;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Default Cache Store
  7. |--------------------------------------------------------------------------
  8. |
  9. | This option controls the default cache store that will be used by the
  10. | framework. This connection is utilized if another isn't explicitly
  11. | specified when running a cache operation inside the application.
  12. |
  13. */
  14. 'default' => env('CACHE_STORE', 'database'),
  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: "array", "database", "file", "memcached",
  25. | "redis", "dynamodb", "octane", "null"
  26. |
  27. */
  28. 'stores' => [
  29. 'array' => [
  30. 'driver' => 'array',
  31. 'serialize' => false,
  32. ],
  33. 'database' => [
  34. 'driver' => 'database',
  35. 'connection' => env('DB_CACHE_CONNECTION'),
  36. 'table' => env('DB_CACHE_TABLE', 'cache'),
  37. 'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
  38. 'lock_table' => env('DB_CACHE_LOCK_TABLE'),
  39. ],
  40. 'file' => [
  41. 'driver' => 'file',
  42. 'path' => storage_path('framework/cache/data'),
  43. 'lock_path' => storage_path('framework/cache/data'),
  44. ],
  45. 'memcached' => [
  46. 'driver' => 'memcached',
  47. 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
  48. 'sasl' => [
  49. env('MEMCACHED_USERNAME'),
  50. env('MEMCACHED_PASSWORD'),
  51. ],
  52. 'options' => [
  53. // Memcached::OPT_CONNECT_TIMEOUT => 2000,
  54. ],
  55. 'servers' => [
  56. [
  57. 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
  58. 'port' => env('MEMCACHED_PORT', 11211),
  59. 'weight' => 100,
  60. ],
  61. ],
  62. ],
  63. 'redis' => [
  64. 'driver' => 'redis',
  65. 'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
  66. 'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
  67. ],
  68. 'dynamodb' => [
  69. 'driver' => 'dynamodb',
  70. 'key' => env('AWS_ACCESS_KEY_ID'),
  71. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  72. 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
  73. 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
  74. 'endpoint' => env('DYNAMODB_ENDPOINT'),
  75. ],
  76. 'octane' => [
  77. 'driver' => 'octane',
  78. ],
  79. ],
  80. /*
  81. |--------------------------------------------------------------------------
  82. | Cache Key Prefix
  83. |--------------------------------------------------------------------------
  84. |
  85. | When utilizing the APC, database, memcached, Redis, and DynamoDB cache
  86. | stores, there might be other applications using the same cache. For
  87. | that reason, you may prefix every cache key to avoid collisions.
  88. |
  89. */
  90. 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
  91. ];