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