forked from miraheze/mw-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlobalCache.php
54 lines (47 loc) · 1.65 KB
/
GlobalCache.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
$wgMemCachedPersistent = false;
// Set timeout to 500ms (in microseconds)
$wgMemCachedTimeout = 0.5 * 1e6;
$wgObjectCaches['memcached-mem-1'] = [
'class' => 'MemcachedPhpBagOStuff',
'serializer' => 'php',
'persistent' => false,
'servers' => [ $wmgCacheSettings['memcached']['server'][1] ],
// Effectively disable the failure limit (0 is invalid)
'server_failure_limit' => 1e9,
// Effectively disable the retry timeout
'retry_timeout' => -1,
'loggroup' => 'memcached',
'timeout' => $wgMemCachedTimeout,
];
$wgObjectCaches['memcached-mem-2'] = [
'class' => 'MemcachedPhpBagOStuff',
'serializer' => 'php',
'persistent' => false,
'servers' => [ $wmgCacheSettings['memcached']['server'][0] ],
// Effectively disable the failure limit (0 is invalid)
'server_failure_limit' => 1e9,
// Effectively disable the retry timeout
'retry_timeout' => -1,
'loggroup' => 'memcached',
'timeout' => $wgMemCachedTimeout,
];
$wgMainCacheType = 'memcached-mem-2';
$wgSessionCacheType = 'memcached-mem-2';
$wgSessionsInObjectCache = true;
$wgMessageCacheType = 'memcached-mem-1';
$wgUseLocalMessageCache = true;
$wgParserCacheType = CACHE_DB;
$wgLanguageConverterCacheType = 'memcached-mem-1';
$jobrunnerSettings = $wmgCacheSettings['jobrunner'];
$wgJobTypeConf['default'] = [
'class' => 'JobQueueRedis',
'redisServer' => $jobrunnerSettings['server'],
'redisConfig' => [
'connectTimeout' => 2,
'password' => $jobrunnerSettings['password'],
'compression' => 'gzip',
],
'claimTTL' => 3600,
'daemonized' => true,
];