MediaWiki REL1_39
CachingSiteStore Class Reference
Inheritance diagram for CachingSiteStore:
Collaboration diagram for CachingSiteStore:

Public Member Functions

 __construct (SiteStore $siteStore, BagOStuff $cache, $cacheKey=null, $cacheTimeout=3600)
 
 clear ()
 Clears the list of sites stored.
 
 getSite ( $globalId)
 
 getSites ()
 
 reset ()
 Purges the internal and external cache of the site list, forcing the list.
 
 saveSite (Site $site)
 
 saveSites (array $sites)
 

Detailed Description

Definition at line 31 of file CachingSiteStore.php.

Constructor & Destructor Documentation

◆ __construct()

CachingSiteStore::__construct ( SiteStore $siteStore,
BagOStuff $cache,
$cacheKey = null,
$cacheTimeout = 3600 )
Parameters
SiteStore$siteStore
BagOStuff$cache
string | null$cacheKey
int$cacheTimeout

Definition at line 64 of file CachingSiteStore.php.

References $cache.

Member Function Documentation

◆ clear()

CachingSiteStore::clear ( )

Clears the list of sites stored.

Only use this for testing, as APC is typically used and is per-server.

See also
SiteStore::clear()
Returns
bool Success

Implements SiteStore.

Definition at line 191 of file CachingSiteStore.php.

References reset().

◆ getSite()

CachingSiteStore::getSite ( $globalId)
See also
SiteStore::getSite
Since
1.25
Parameters
string$globalId
Returns
Site|null

Implements SiteLookup.

Definition at line 127 of file CachingSiteStore.php.

References SiteList\getSite(), getSites(), and SiteList\hasSite().

◆ getSites()

CachingSiteStore::getSites ( )
See also
SiteStore::getSites
Since
1.25
Returns
SiteList

Implements SiteLookup.

Definition at line 106 of file CachingSiteStore.php.

Referenced by getSite().

◆ reset()

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

Since
1.25

Definition at line 176 of file CachingSiteStore.php.

Referenced by clear(), and saveSites().

◆ saveSite()

CachingSiteStore::saveSite ( Site $site)
See also
SiteStore::saveSite
Since
1.25
Parameters
Site$site
Returns
bool Success indicator

Implements SiteStore.

Definition at line 142 of file CachingSiteStore.php.

References saveSites().

◆ saveSites()

CachingSiteStore::saveSites ( array $sites)
See also
SiteStore::saveSites
Since
1.25
Parameters
Site[]$sites
Returns
bool Success indicator

Implements SiteStore.

Definition at line 155 of file CachingSiteStore.php.

References $success, and reset().

Referenced by saveSite().


The documentation for this class was generated from the following file: