cache.php 2.61 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1 2 3 4 5 6 7 8 9 10 11 12
<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Cache Store
    |--------------------------------------------------------------------------
    |
    | This option controls the default cache connection that gets used while
    | using this caching library. This connection is used when another is
    | not explicitly specified when executing a given caching function.
13 14
    |
    | Supported: "apc", "array", "database", "file", "memcached", "redis"
Dominik Hebeler's avatar
Dominik Hebeler committed
15
    |
16
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
17

18
    'default' => env('CACHE_DRIVER', 'redis'),
Dominik Hebeler's avatar
Dominik Hebeler committed
19 20 21 22 23 24 25 26 27 28

    /*
    |--------------------------------------------------------------------------
    | Cache Stores
    |--------------------------------------------------------------------------
    |
    | Here you may define all of the cache "stores" for your application as
    | well as their drivers. You may even define multiple stores for the
    | same cache driver to group types of items stored in your caches.
    |
29
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
30

31
    'stores'  => [
Dominik Hebeler's avatar
Dominik Hebeler committed
32

33
        'apc'       => [
Dominik Hebeler's avatar
Dominik Hebeler committed
34 35 36
            'driver' => 'apc',
        ],

37
        'array'     => [
Dominik Hebeler's avatar
Dominik Hebeler committed
38 39 40
            'driver' => 'array',
        ],

41 42 43
        'database'  => [
            'driver'     => 'database',
            'table'      => 'cache',
Dominik Hebeler's avatar
Dominik Hebeler committed
44 45 46
            'connection' => null,
        ],

47
        'file'      => [
Dominik Hebeler's avatar
Dominik Hebeler committed
48
            'driver' => 'file',
49
            'path'   => storage_path('framework/cache'),
Dominik Hebeler's avatar
Dominik Hebeler committed
50 51 52
        ],

        'memcached' => [
53 54 55 56 57 58 59 60 61 62
            'driver'        => 'memcached',
            'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
            'sasl'          => [
                env('MEMCACHED_USERNAME'),
                env('MEMCACHED_PASSWORD'),
            ],
            'options'       => [
                // Memcached::OPT_CONNECT_TIMEOUT  => 2000,
            ],
            'servers'       => [
Dominik Hebeler's avatar
Dominik Hebeler committed
63
                [
64 65
                    'host'   => env('MEMCACHED_HOST', '127.0.0.1'),
                    'port'   => env('MEMCACHED_PORT', 11211),
Dominik Hebeler's avatar
Dominik Hebeler committed
66 67 68 69 70
                    'weight' => 100,
                ],
            ],
        ],

71 72 73
        'redis'     => [
            'driver'     => 'redis',
            'connection' => 'redisCache',
Dominik Hebeler's avatar
Dominik Hebeler committed
74 75 76 77 78 79 80 81 82 83 84 85 86
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Cache Key Prefix
    |--------------------------------------------------------------------------
    |
    | When utilizing a RAM based store such as APC or Memcached, there might
    | be other applications utilizing the same cache. So, we'll specify a
    | value to get prefixed to all our keys so we can avoid collisions.
    |
87
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
88

89
    'prefix'  => 'laravel',
Dominik Hebeler's avatar
Dominik Hebeler committed
90 91

];