Skip to content

Commit 8cdc606

Browse files
paladoxgithub-actions
and
github-actions
authored
Add db-mainstash (#5361)
Co-authored-by: github-actions <[email protected]>
1 parent 5a5466d commit 8cdc606

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

GlobalCache.php

+29-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,33 @@
6666
'reportDupes' => false
6767
];
6868

69+
$wgObjectCaches['db-mainstash'] = [
70+
'class' => 'SqlBagOStuff',
71+
'server' => [
72+
'type' => 'mysql',
73+
'host' => $beta ? 'db121.miraheze.org' : 'db131.miraheze.org',
74+
'dbname' => $beta ? 'testmainstash' : 'mainstash',
75+
'user' => $wgDBuser,
76+
'password' => $wgDBpassword,
77+
'ssl' => true,
78+
'flags' => 0,
79+
'sslCAFile' => '/etc/ssl/certs/Sectigo.crt',
80+
],
81+
'dbDomain' => 'mainstash',
82+
'globalKeyLbDomain' => 'mainstash',
83+
'tableName' => 'objectstash',
84+
'multiPrimaryMode' => false,
85+
'purgePeriod' => 100,
86+
'purgeLimit' => 1000,
87+
'reportDupes' => false
88+
];
89+
90+
$wgMainStash = 'db-mainstash';
91+
6992
$wgSessionCacheType = 'memcached-mem-1';
7093

7194
// Same as $wgMainStash
72-
$wgMWOAuthSessionCacheType = 'db-replicated';
95+
$wgMWOAuthSessionCacheType = 'db-mainstash';
7396

7497
$redisServerIP = '[2a10:6740::6:306]:6379';
7598

@@ -85,11 +108,13 @@
85108
'newusopediawiki',
86109
'xedwiki',
87110
];
88-
//$disableWarmup = in_array( $wgDBname, $disableWarmupArray );
111+
// $disableWarmup = in_array( $wgDBname, $disableWarmupArray );
89112
$disableWarmup = true;
90113
$wgParsoidCacheConfig = [
91-
'StashType' => 'db-replicated',
92-
'StashDuration' => 86400 * 10,
114+
// Defaults to MainStash
115+
'StashType' => null,
116+
// 24h in production, VE will fail to save after this time.
117+
'StashDuration' => 24 * 60 * 60,
93118
'CacheThresholdTime' => 0.0,
94119
'WarmParsoidParserCache' => $disableWarmup ? false : true,
95120
];

0 commit comments

Comments
 (0)