MediaWiki REL1_40
|
Hold a configured list of sites (SiteList), with a caching layer. More...
Inherits 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 29 of file CachingSiteStore.php.
Definition at line 44 of file CachingSiteStore.php.
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 SiteStore.
Definition at line 160 of file CachingSiteStore.php.
References reset().
CachingSiteStore::getSite | ( | $globalId | ) |
string | $globalId |
Implements SiteLookup.
Definition at line 102 of file CachingSiteStore.php.
References SiteList\getSite(), getSites(), and SiteList\hasSite().
CachingSiteStore::getSites | ( | ) |
Implements SiteLookup.
Definition at line 81 of file CachingSiteStore.php.
Referenced by getSite().
CachingSiteStore::reset | ( | ) |
Purge the internal and external cache of the site list, forcing the list.
of sites to be reloaded.
Definition at line 145 of file CachingSiteStore.php.
Referenced by clear(), and saveSites().
CachingSiteStore::saveSite | ( | Site | $site | ) |
Site | $site |
Implements SiteStore.
Definition at line 115 of file CachingSiteStore.php.
References saveSites().
CachingSiteStore::saveSites | ( | array | $sites | ) |
Site[] | $sites |
Implements SiteStore.
Definition at line 126 of file CachingSiteStore.php.
References $success, and reset().
Referenced by saveSite().