MediaWiki master
|
Hold a configured list of sites (SiteList), with a caching layer. More...
Inherits MediaWiki\Site\SiteStore.
Public Member Functions | |
__construct (SiteStore $siteStore, BagOStuff $cache) | |
clear () | |
Clears the list of sites stored. | |
getSite ( $globalId) | |
getSites () | |
reset () | |
Purge the internal and external cache of the site list, forcing the list. | |
saveSite (Site $site) | |
saveSites (array $sites) | |
Hold a configured list of sites (SiteList), with a caching layer.
Definition at line 33 of file CachingSiteStore.php.
SiteStore | $siteStore | |
BagOStuff | $cache |
Definition at line 48 of file CachingSiteStore.php.
MediaWiki\Site\CachingSiteStore::clear | ( | ) |
Clears the list of sites stored.
NOTE: The fact that this also clears the in-process cache is an internal detail for PHPUnit testing only. The injected cache is generally APCU, which is per-server, so the cache reset would not apply to any other web servers.
Implements MediaWiki\Site\SiteStore.
Definition at line 164 of file CachingSiteStore.php.
References MediaWiki\Site\CachingSiteStore\reset().
MediaWiki\Site\CachingSiteStore::getSite | ( | $globalId | ) |
string | $globalId |
Implements MediaWiki\Site\SiteLookup.
Definition at line 106 of file CachingSiteStore.php.
References MediaWiki\Site\SiteList\getSite(), MediaWiki\Site\CachingSiteStore\getSites(), and MediaWiki\Site\SiteList\hasSite().
MediaWiki\Site\CachingSiteStore::getSites | ( | ) |
Implements MediaWiki\Site\SiteLookup.
Definition at line 85 of file CachingSiteStore.php.
Referenced by MediaWiki\Site\CachingSiteStore\getSite().
MediaWiki\Site\CachingSiteStore::reset | ( | ) |
Purge the internal and external cache of the site list, forcing the list.
of sites to be reloaded.
Definition at line 149 of file CachingSiteStore.php.
Referenced by MediaWiki\Site\CachingSiteStore\clear(), and MediaWiki\Site\CachingSiteStore\saveSites().
MediaWiki\Site\CachingSiteStore::saveSite | ( | Site | $site | ) |
Site | $site |
Implements MediaWiki\Site\SiteStore.
Definition at line 119 of file CachingSiteStore.php.
References MediaWiki\Site\CachingSiteStore\saveSites().
MediaWiki\Site\CachingSiteStore::saveSites | ( | array | $sites | ) |
Site[] | $sites |
Implements MediaWiki\Site\SiteStore.
Definition at line 130 of file CachingSiteStore.php.
References $success, and MediaWiki\Site\CachingSiteStore\reset().
Referenced by MediaWiki\Site\CachingSiteStore\saveSite().