Wikibase
MediaWiki Wikibase extension
|
Prefetches terms from the UncachedTermsPrefetcher which stores the terms in the CacheInterface. More...
Public Member Functions | |
__construct (CacheInterface $cache, UncachedTermsPrefetcher $termsPrefetcher, RedirectResolvingLatestRevisionLookup $redirectResolvingRevisionLookup, ContentLanguages $termLanguages) | |
prefetchTerms (array $entityIds, array $termTypes, array $languageCodes) | |
getPrefetchedTerm (EntityId $entityId, $termType, $languageCode) | |
getLabel (EntityId $entityId, $languageCode) | |
getLabels (EntityId $entityId, array $languageCodes) | |
getDescription (EntityId $entityId, $languageCode) | |
getDescriptions (EntityId $entityId, array $languageCodes) | |
getPrefetchedAliases (EntityId $entityId, $languageCode) | |
Returns terms that were previously loaded by prefetchTerms. | |
Private Member Functions | |
getCacheKey (EntityId $id, string $language, string $termType) | |
getCacheEntry (EntityId $entityId, string $termType, string $languageCode) | |
getMultipleTermsByLanguage (EntityId $entityId, string $termType, array $languages) | |
filterValidTermLanguages (array $languageCodes) | |
Private Attributes | |
$cache | |
$termsPrefetcher | |
$redirectResolvingRevisionLookup | |
$termLanguages | |
Prefetches terms from the UncachedTermsPrefetcher which stores the terms in the CacheInterface.
Looks up terms from CacheInterface.
For this reason CacheInterface MUST be a real cache (can store for at least this 1 request).
CacheInterface determines the medium of caching, and thus the availability (process, server, WAN). UncachedTermsPrefetcher controls the ttl of the cached data.
Wikibase\Lib\Store\CachingPrefetchingTermLookup::__construct | ( | CacheInterface | $cache, |
UncachedTermsPrefetcher | $termsPrefetcher, | ||
RedirectResolvingLatestRevisionLookup | $redirectResolvingRevisionLookup, | ||
ContentLanguages | $termLanguages | ||
) |
CacheInterface | $cache | This must actually be a functioning cache, that can at least cache things within the current request. This is because the UncachedTermsPrefetcher uses the cache to pass data back to this class. If you do not have a cache you should be using PrefetchingPropertyTermLookup directly. |
UncachedTermsPrefetcher | $termsPrefetcher | |
RedirectResolvingLatestRevisionLookup | $redirectResolvingRevisionLookup | |
ContentLanguages | $termLanguages |
|
private |
|
private |
|
private |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::getDescription | ( | EntityId | $entityId, |
$languageCode | |||
) |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::getDescriptions | ( | EntityId | $entityId, |
array | $languageCodes | ||
) |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::getLabel | ( | EntityId | $entityId, |
$languageCode | |||
) |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::getLabels | ( | EntityId | $entityId, |
array | $languageCodes | ||
) |
|
private |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::getPrefetchedAliases | ( | EntityId | $entityId, |
$languageCode | |||
) |
Returns terms that were previously loaded by prefetchTerms.
EntityId | $entityId | |
string | $languageCode |
Implements Wikibase\DataAccess\AliasTermBuffer.
Wikibase\Lib\Store\CachingPrefetchingTermLookup::getPrefetchedTerm | ( | EntityId | $entityId, |
$termType, | |||
$languageCode | |||
) |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::prefetchTerms | ( | array | $entityIds, |
array | $termTypes, | ||
array | $languageCodes | ||
) |
|
private |
|
private |
|
private |
|
private |