Skip to content

Commit 8ba2ab9

Browse files
committed
add varnish configuration
1 parent b206116 commit 8ba2ab9

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

LocalSettings.d/base/LocalSettings.override.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
$wgCacheDirectory = "$IP/cache/$wgDBname";
190190

191191
// speed up speed for anonymous users https://www.mediawiki.org/wiki/Manual:$wgUseFileCache
192-
$wgUseFileCache=true;
192+
$wgUseFileCache=false;
193193

194194
// speed up article count, by reducing the number of queries to the (giant) pagelink tables
195195
$wgArticleCountMethod='any';

LocalSettings.d/base/cdn.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
$wgUseCdn = getenv('USE_CDN') === 'true' ? true : false;
4+
5+
if ($wgUseCdn) {
6+
$wgCdnServers = [ '10.217.0.0/16' ];
7+
$wgInternalServer = str_replace('https://', 'http://', $wgServer);
8+
$wgCdnMaxAge = 18000; // 5 hours (default)
9+
$wgCdnMaxageLagged = 18000; // MediaWiki incorrectly detects lagged database due to Galera cluster architecture.
10+
}

LocalSettings.d/staging/zz_varnish.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)