我使用 XAMPP 在闪存驱动器上安装了本地 MediaWiki。据我所知,我启用了除 Varnish 之外的所有可能的缓存形式,因为它在 Windows 上不可用。此外,还启用了 miser 模式和许多其他似乎可以提高速度的设置。但是,修改 LocalSettings.php 后,加载主页(或任何其他页面)仍然需要大约 40 秒。我可能误用了 Squid,因为我找不到任何说明我是否可以在本地使用它的信息(尽管我倾向于不可以,因为启用和禁用它之间没有明显的速度差异)。我已启用 php_apc。有什么方法可以加快速度吗?
这是我的 LocalSettings.php 文件(删除了注释以简化内容):
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
$wgCachePages=true;
$wgSitename = "MyWiki";
$wgScriptPath = "/wiki";
$wgServer = "http://127.0.0.1";
$wgResourceBasePath = $wgScriptPath;
$wgLogo = "$wgResourceBasePath/images/WikiLogo_135px.png";
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "apache@localhost";
$wgPasswordSender = "apache@localhost";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
$wgDBtype = "mysql";
$wgDBserver = "127.0.0.1";
$wgDBname = "wikidb";
$wgDBuser = "wiki";
$wgDBpassword = "[redacted]";
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";
$wgDBmysql5 = false;
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "C:\\Program Files\\ImageMagick-7.0.7-Q16\\convert.exe";
$wgUseInstantCommons = true;
$wgPingback = false;
$wgShellLocale = "C.UTF-8";
#$wgCacheDirectory = "$IP/cache";
$wgLanguageCode = "en";
$wgSecretKey = "[redacted]";
$wgAuthenticationTokenVersion = "1";
$wgUpgradeKey = "22275bc0e8047d19";
$wgRightsPage = "";
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
$wgDiff3 = "";
$wgDefaultSkin = "vector";
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );
$wgFavicon = "$wgResourceBasePath/favicon.ico";
$wgJobRunRate = 0;
$wgUseFileCache = true;
$wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
$wgEnableSidebarCache = true;
$wgCacheDirectory = "{$wgUploadDirectory}/cache2";
$wgLocalisationCacheConf = array(
'class' => 'LocalisationCache',
'store' => 'files',
'storeClass' => false,
'manualRecache' => false,
);
$wgUsePrivateIPs = true;
$wgHitcounterUpdateFreq=20000;
$wgEnableParserCache=true;
$wgShowIPinHeader = false;
$wgUseGzip = true;
$wgMiserMode = true;
$wgCompressRevisions = true;
$wgRevisionCacheExpiry = 3*24*3600;
$wgParserCacheExpireTime = 14*24*3600;
$wgGroupPermissions['autopatrolled']['autopatrol'] = true;
$wgSessionsInObjectCache=true;
$wgSessionCacheType=CACHE_ACCEL;
$wgInvalidateCacheOnLocalSettingsChange=false;
$wgDisableQueryPages=true;
$wgUseSquid = true;
$wgSquidServers = array('127.0.0.1'); # improper?
$wgSquidServersNoPurge = array('127.0.0.1');