A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Interwiki_cache below:

Manual:Interwiki cache - MediaWiki

MediaWiki has a database table (interwiki table) for interwiki prefixes. This is by default used directly, but two types of caching can be used for better performance.

Database and memcached[edit]

When memcached is enabled, the interwiki prefixes of the database table will be cached too. This can be controlled using the $wgInterwikiExpiry setting.

This cache can be cleared using the clearInterwikiCache.php script. It removes the caching based on the prefixes found in the database table.

The $wgInterwikiCache variable can be set to a static array that will be used instead of the database table, thus achieving even better performance by removing latencies to memcached and avoiding the database queries to populate a cache.

The array is typically stored in a PHP file containing <?php return array( .. ); and loaded by assigning it to $wgInterwikiCache with require.

MediaWiki does not currently provide a built-in script to build such a cache file (T35395), however the extension Extension:WikimediaMaintenance contains dumpInterwiki.php which is a WMF-specific script.

The $wgInterwikiScopes and $wgInterwikiFallbackSite settings are used when reading this cache.

Setting this up on your own wiki[edit]
Add this value to all.dblist, assuming it's not already in there. If it does not start with a known language code (e.g. it is, say, 'wikitech-mw_' instead of something nice like 'frwiktionary'), add it also to special.dblist. You can check the language codes in the langlist file you copied over.

Now shortcuts and all other iw links should work for your project. Note that if you added it to 'special.dblist', it will behave as though it is a 'wikipedia' with en as the default language.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4