Use wikimedia/xmp-reader library
[lhc/web/wiklou.git] / docs / sitescache.txt
1 MediaWiki's SiteStore can be cached and stored in a flat file,
2 in a json format. If the SiteStore is frequently accessed, the
3 file cache may provide a performance benefit over a database
4 store, even with memcached in front of it.
5
6 Configuration:
7
8 File-based caching can be enabled by setting $wgSitesCacheFile
9 to the file path of the cache file.
10
11 The file can then be generated with the rebuildSitesCache.php
12 maintenance script.
13
14 Format:
15
16 In the sites cache file, sites are listed in a key-value
17 map, with the key being the site's global id (e.g. "enwiki")
18 and a key-value map as the value. The site list is wrapped
19 with in a "sites" key.
20
21 Example:
22
23 "sites": {
24 "aawiktionary": {
25 "globalid": "aawiktionary",
26 "type": "mediawiki",
27 "group": "wiktionary",
28 "source": "local",
29 "language": "aa",
30 "localids": [],
31 "config": [],
32 "data": {
33 "paths": {
34 "file_path": "http:\/\/aa.wiktionary.org\/w\/$1",
35 "page_path": "http:\/\/aa.wiktionary.org\/wiki\/$1"
36 }
37 },
38 "forward": false,
39 "internalid": 2666,
40 "identifiers": []
41 }
42 }