Skip to content

Commit 3a2e20c

Browse files
committed
change cache to memcached
1 parent 9f07b07 commit 3a2e20c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

LocalSettings.d/base/LocalSettings.override.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,18 @@
175175
# see https://www.mediawiki.org/wiki/Manual:$wgMultiShardSiteStats/en
176176
$wgMultiShardSiteStats = true;
177177
# https://www.mediawiki.org/wiki/Manual:$wgMainCacheType maybe we need to increase the size of the APC cache at some point in time
178-
$wgMainCacheType = CACHE_ACCEL;
178+
$wgMainCacheType = CACHE_MEMCACHED;
179+
$wgMemCachedServers = [
180+
(getenv('MW_MEMCACHED_HOST') ?: 'memcached') . ':' . (getenv('MW_MEMCACHED_PORT') ?: '11211')
181+
];
179182
$wgSessionCacheType = CACHE_DB;
180183
// Speed up "On high-traffic wikis, this should be set to false, to avoid the need to check the file modification time, and to avoid the performance impact of unnecessary cache invalidations. " see https://www.mediawiki.org/wiki/Manual:$wgInvalidateCacheOnLocalSettingsChange
181184
$wgInvalidateCacheOnLocalSettingsChange=false;
182185
// Store language cache on disk (should be faster) https://www.mediawiki.org/wiki/Manual:$wgLocalisationCacheConf
183186
$wgCacheDirectory = "$IP/cache/$wgDBname";
184187

185188
// speed up speed for anonymous users https://www.mediawiki.org/wiki/Manual:$wgUseFileCache
186-
$wgUseFileCache=true;
189+
$wgUseFileCache=false;
187190

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

LocalSettings.d/staging/zz_cache.php

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

0 commit comments

Comments
 (0)