MediaWiki master
|
Wrap SiteList with an in-process cache and (optionally) a local-server cache. 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) | |
Wrap SiteList with an in-process cache and (optionally) a local-server cache.
Definition at line 33 of file CachingSiteStore.php.
Definition at line 43 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 159 of file CachingSiteStore.php.
References MediaWiki\Site\CachingSiteStore\reset().
MediaWiki\Site\CachingSiteStore::getSite | ( | $globalId | ) |
string | $globalId |
Implements MediaWiki\Site\SiteLookup.
Definition at line 101 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 80 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 144 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 114 of file CachingSiteStore.php.
References MediaWiki\Site\CachingSiteStore\saveSites().
MediaWiki\Site\CachingSiteStore::saveSites | ( | array | $sites | ) |
Site[] | $sites |
Implements MediaWiki\Site\SiteStore.
Definition at line 125 of file CachingSiteStore.php.
References $success, and MediaWiki\Site\CachingSiteStore\reset().
Referenced by MediaWiki\Site\CachingSiteStore\saveSite().