Adjust Shortpages query with multiple content namespaces
[mediawiki.git] / docs / sitescache.txt
blob13bf371d20528c02dc47efaceeb38cf7b3dbafee
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.
6 Configuration:
8 File-based caching can be enabled by setting $wgSitesCacheFile
9 to the file path of the cache file.
11 The file can then be generated with the rebuildSitesCache.php
12 maintenance script.
14 Format:
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.
21 Example:
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         }