LaravelTest

Форк
0
/
cache.php 
107 строк · 3.3 Кб
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 store that will be used by the
13
    | framework. This connection is utilized if another isn't explicitly
14
    | specified when running a cache operation inside the application.
15
    |
16
    */
17

18
    'default' => env('CACHE_STORE', 'database'),
19

20
    /*
21
    |--------------------------------------------------------------------------
22
    | Cache Stores
23
    |--------------------------------------------------------------------------
24
    |
25
    | Here you may define all of the cache "stores" for your application as
26
    | well as their drivers. You may even define multiple stores for the
27
    | same cache driver to group types of items stored in your caches.
28
    |
29
    | Supported drivers: "apc", "array", "database", "file", "memcached",
30
    |                    "redis", "dynamodb", "octane", "null"
31
    |
32
    */
33

34
    'stores' => [
35

36
        'array' => [
37
            'driver' => 'array',
38
            'serialize' => false,
39
        ],
40

41
        'database' => [
42
            'driver' => 'database',
43
            'table' => env('DB_CACHE_TABLE', 'cache'),
44
            'connection' => env('DB_CACHE_CONNECTION'),
45
            'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
46
        ],
47

48
        'file' => [
49
            'driver' => 'file',
50
            'path' => storage_path('framework/cache/data'),
51
            'lock_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' => env('REDIS_CACHE_CONNECTION', 'cache'),
76
            'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
77
        ],
78

79
        'dynamodb' => [
80
            'driver' => 'dynamodb',
81
            'key' => env('AWS_ACCESS_KEY_ID'),
82
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
83
            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
84
            'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
85
            'endpoint' => env('DYNAMODB_ENDPOINT'),
86
        ],
87

88
        'octane' => [
89
            'driver' => 'octane',
90
        ],
91

92
    ],
93

94
    /*
95
    |--------------------------------------------------------------------------
96
    | Cache Key Prefix
97
    |--------------------------------------------------------------------------
98
    |
99
    | When utilizing the APC, database, memcached, Redis, and DynamoDB cache
100
    | stores, there might be other applications using the same cache. For
101
    | that reason, you may prefix every cache key to avoid collisions.
102
    |
103
    */
104

105
    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
106

107
];
108

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.