MediaWiki
1.33.0
|
Public Member Functions | |
__construct (SiteStore $siteStore, BagOStuff $cache, $cacheKey=null, $cacheTimeout=3600) | |
clear () | |
Clears the list of sites stored. More... | |
getSite ( $globalId) | |
getSites () | |
reset () | |
Purges the internal and external cache of the site list, forcing the list. More... | |
saveSite (Site $site) | |
saveSites (array $sites) | |
Private Member Functions | |
getCacheKey () | |
Constructs a cache key to use for caching the list of sites. More... | |
Private Attributes | |
BagOStuff | $cache |
string null | $cacheKey |
int | $cacheTimeout |
SiteList null | $sites = null |
SiteStore | $siteStore |
Definition at line 31 of file CachingSiteStore.php.
CachingSiteStore::__construct | ( | SiteStore | $siteStore, |
BagOStuff | $cache, | ||
$cacheKey = null , |
|||
$cacheTimeout = 3600 |
|||
) |
Definition at line 64 of file CachingSiteStore.php.
References $cache, $cacheKey, $cacheTimeout, $siteStore, and cache.
CachingSiteStore::clear | ( | ) |
Clears the list of sites stored.
Only use this for testing, as APC is typically used and is per-server.
Implements SiteStore.
Definition at line 193 of file CachingSiteStore.php.
References reset().
|
private |
Constructs a cache key to use for caching the list of sites.
This includes the concrete class name of the site list as well as a version identifier for the list's serialization, to avoid problems when unserializing site lists serialized by an older version, e.g. when reading from a cache.
The cache key also includes information about where the sites were loaded from, e.g. the name of a database table.
Definition at line 90 of file CachingSiteStore.php.
References $cacheKey, $type, cache, and SiteList\getSerialVersionId().
Referenced by getSites(), and reset().
CachingSiteStore::getSite | ( | $globalId | ) |
string | $globalId |
Implements SiteLookup.
Definition at line 129 of file CachingSiteStore.php.
References $sites, SiteList\getSite(), getSites(), and SiteList\hasSite().
CachingSiteStore::getSites | ( | ) |
Implements SiteLookup.
Definition at line 106 of file CachingSiteStore.php.
References $sites, cache, and getCacheKey().
Referenced by getSite().
CachingSiteStore::reset | ( | ) |
Purges the internal and external cache of the site list, forcing the list.
of sites to be reloaded.
Only use this for testing, as APC is typically used and is per-server
Definition at line 178 of file CachingSiteStore.php.
References cache, and getCacheKey().
Referenced by clear(), and saveSites().
CachingSiteStore::saveSite | ( | Site | $site | ) |
Site | $site |
Implements SiteStore.
Definition at line 144 of file CachingSiteStore.php.
References saveSites().
CachingSiteStore::saveSites | ( | array | $sites | ) |
Site[] | $sites |
Implements SiteStore.
Definition at line 157 of file CachingSiteStore.php.
References $sites, $success, and reset().
Referenced by saveSite().
|
private |
Definition at line 51 of file CachingSiteStore.php.
Referenced by __construct().
Definition at line 41 of file CachingSiteStore.php.
Referenced by __construct(), and getCacheKey().
|
private |
Definition at line 46 of file CachingSiteStore.php.
Referenced by __construct().
Definition at line 36 of file CachingSiteStore.php.
Referenced by getSite(), getSites(), and saveSites().
|
private |
Definition at line 56 of file CachingSiteStore.php.
Referenced by __construct().