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.

104 lines
3.0 KiB

4 years ago
  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"
  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. ],
  41. 'file' => [
  42. 'driver' => 'file',
  43. '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' => 'cache',
  66. ],
  67. 'dynamodb' => [
  68. 'driver' => 'dynamodb',
  69. 'key' => env('AWS_ACCESS_KEY_ID'),
  70. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  71. 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
  72. 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
  73. 'endpoint' => env('DYNAMODB_ENDPOINT'),
  74. ],
  75. ],
  76. /*
  77. |--------------------------------------------------------------------------
  78. | Cache Key Prefix
  79. |--------------------------------------------------------------------------
  80. |
  81. | When utilizing a RAM based store such as APC or Memcached, there might
  82. | be other applications utilizing the same cache. So, we'll specify a
  83. | value to get prefixed to all our keys so we can avoid collisions.
  84. |
  85. */
  86. 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
  87. ];