cache.php 2.5 KB

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