SiteLinkLookup implementation that caches the obtained data (except for data obtained via "getLinks").
More...
SiteLinkLookup implementation that caches the obtained data (except for data obtained via "getLinks").
Note: This doesn't implement any means of purging or data invalidation beyond the cache timeout.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
◆ __construct()
Wikibase\Lib\Store\CachingSiteLinkLookup::__construct |
( |
SiteLinkLookup |
$siteLinkLookup, |
|
|
BagOStuff |
$cache, |
|
|
|
$cacheDuration = 3600 , |
|
|
|
$cacheKeyPrefix = 'wikibase' |
|
) |
| |
- Parameters
-
SiteLinkLookup | $siteLinkLookup | The lookup to use |
BagOStuff | $cache | The cache to use |
int | $cacheDuration | Cache duration in seconds. Defaults to 3600 (1 hour). |
string | $cacheKeyPrefix | Cache key prefix to use. Important in case we're not in-process caching. Defaults to "wikibase" |
◆ getAndCacheItemIdForLink()
Wikibase\Lib\Store\CachingSiteLinkLookup::getAndCacheItemIdForLink |
( |
string |
$globalSiteId, |
|
|
string |
$pageTitle |
|
) |
| |
|
private |
◆ getByPageCacheKey()
Wikibase\Lib\Store\CachingSiteLinkLookup::getByPageCacheKey |
( |
string |
$globalSiteId, |
|
|
string |
$pageTitle |
|
) |
| |
|
private |
◆ getItemIdForLink()
Wikibase\Lib\Store\CachingSiteLinkLookup::getItemIdForLink |
( |
string |
$globalSiteId, |
|
|
string |
$pageTitle |
|
) |
| |
◆ getItemIdForSiteLink()
Wikibase\Lib\Store\CachingSiteLinkLookup::getItemIdForSiteLink |
( |
SiteLink |
$siteLink | ) |
|
◆ getLinks()
Wikibase\Lib\Store\CachingSiteLinkLookup::getLinks |
( |
?array |
$numericIds = null , |
|
|
?array |
$siteIds = null , |
|
|
?array |
$pageNames = null |
|
) |
| |
◆ getSiteLinksForItem()
Wikibase\Lib\Store\CachingSiteLinkLookup::getSiteLinksForItem |
( |
ItemId |
$itemId | ) |
|
Returns an array of SiteLink objects for an item.
If the item isn't known or not an Item, an empty array is returned.
- Parameters
-
- Returns
- SiteLink[]
Implements Wikibase\Lib\Store\SiteLinkLookup.
◆ $cache
Wikibase\Lib\Store\CachingSiteLinkLookup::$cache |
|
private |
◆ $cacheDuration
Wikibase\Lib\Store\CachingSiteLinkLookup::$cacheDuration |
|
private |
◆ $cacheKeyPrefix
Wikibase\Lib\Store\CachingSiteLinkLookup::$cacheKeyPrefix |
|
private |
◆ $lookup
Wikibase\Lib\Store\CachingSiteLinkLookup::$lookup |
|
private |
The documentation for this class was generated from the following file: