Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/config/cache.php
7382 views
1
<?php
2
3
use Illuminate\Support\Str;
4
5
return [
6
/*
7
|--------------------------------------------------------------------------
8
| Default Cache Store
9
|--------------------------------------------------------------------------
10
|
11
| This option controls the default cache store that will be used by the
12
| framework. This connection is utilized if another isn't explicitly
13
| specified when running a cache operation inside the application.
14
|
15
*/
16
17
'default' => env('CACHE_STORE', env('CACHE_DRIVER', 'redis')),
18
19
/*
20
|--------------------------------------------------------------------------
21
| Cache Stores
22
|--------------------------------------------------------------------------
23
|
24
| Here you may define all of the cache "stores" for your application as
25
| well as their drivers. You may even define multiple stores for the
26
| same cache driver to group types of items stored in your caches.
27
|
28
| Supported drivers: "array", "database", "file", "memcached",
29
| "redis", "octane", "null"
30
|
31
*/
32
33
'stores' => [
34
'array' => [
35
'driver' => 'array',
36
'serialize' => false,
37
],
38
39
'database' => [
40
'driver' => 'database',
41
'connection' => env('DB_CACHE_CONNECTION'),
42
'table' => env('DB_CACHE_TABLE', 'cache'),
43
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
44
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
45
],
46
47
'file' => [
48
'driver' => 'file',
49
'path' => storage_path('framework/cache/data'),
50
'lock_path' => storage_path('framework/cache/data'),
51
],
52
53
'memcached' => [
54
'driver' => 'memcached',
55
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
56
'sasl' => [
57
env('MEMCACHED_USERNAME'),
58
env('MEMCACHED_PASSWORD'),
59
],
60
'options' => [
61
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
62
],
63
'servers' => [
64
[
65
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
66
'port' => env('MEMCACHED_PORT', 11211),
67
'weight' => 100,
68
],
69
],
70
],
71
72
'redis' => [
73
'driver' => 'redis',
74
'connection' => env('REDIS_CACHE_CONNECTION', 'default'),
75
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
76
],
77
78
'sessions' => [
79
'driver' => env('SESSION_DRIVER', 'database'),
80
'table' => 'sessions',
81
'connection' => env('SESSION_DRIVER') === 'redis' ? 'sessions' : null,
82
],
83
84
'octane' => [
85
'driver' => 'octane',
86
],
87
],
88
89
/*
90
|--------------------------------------------------------------------------
91
| Cache Key Prefix
92
|--------------------------------------------------------------------------
93
|
94
| When utilizing the APC, database, memcached, Redis, or DynamoDB cache
95
| stores there might be other applications using the same cache. For
96
| that reason, you may prefix every cache key to avoid collisions.
97
|
98
*/
99
100
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'pterodactyl'), '_') . '_cache_'),
101
];
102
103