Wikibase
MediaWiki Wikibase extension
|
Prefetches terms from the Cache or via the provided PrefetchingTermLookup if not cached. More...
Public Member Functions | |
__construct (CacheInterface $cache, PrefetchingTermLookup $lookup, RedirectResolvingLatestRevisionLookup $redirectResolvingRevisionLookup, ContentLanguages $termLanguages, ?int $ttl=null) | |
prefetchTerms (array $entityIds, array $termTypes, array $languageCodes) | |
getPrefetchedTerm (EntityId $entityId, $termType, $languageCode) | |
getPrefetchedAliases (EntityId $entityId, $languageCode) | |
Returns terms that were previously loaded by prefetchTerms. More... | |
getLabel (EntityId $entityId, $languageCode) | |
getDescription (EntityId $entityId, $languageCode) | |
getLabels (EntityId $entityId, array $languageCodes) | |
getDescriptions (EntityId $entityId, array $languageCodes) | |
Private Member Functions | |
getTerm (EntityId $entityId, string $languageCode, string $termType) | |
prefetchCachedTerms (array $entityIds, array $termTypes, array $languageCodes) | |
getCacheKeys (array $entityIds, array $termTypes, array $languageCodes) | |
prefetchAndCache (array $uncachedIds, array $uncachedTermTypes, array $uncachedLanguageCodes) | |
getPrefetchedTermsFromLookup (array $entitiesToPrefetch, array $languagesToPrefetch, array $termTypes) | |
getTermFromLookup (EntityId $entity, string $termType, string $language) | |
setPrefetchedTermBuffer (EntityId $entityId, string $termType, string $languageCode, $value) | |
bufferAndCacheExistingTerm (EntityId $entityId, string $termType, string $languageCode, $freshTerm) | |
bufferAndCacheMissingTerm (EntityId $entityId, string $termType, string $languageCode) | |
getCacheKey (EntityId $id, string $language, string $termType) | |
getBufferedOrCachedEntry (EntityId $entityId, string $termType, string $languageCode) | |
getMultipleTermsByLanguageFromBuffer (EntityId $entityId, string $termType, array $languages) | |
getMultipleTermsByLanguageFromCache (EntityId $entityId, string $termType, array $languages) | |
getMultipleTermsByLanguageFromLookup (EntityId $entityId, string $termType, array $languages) | |
getMultipleTermsByLanguage (EntityId $entityId, string $termType, array $languages) | |
filterValidTermLanguages (array $languageCodes) | |
Private Attributes | |
const | DEFAULT_TTL = 60 |
const | RESOLVED_KEYS = 'resolvedKeys' |
const | UNRESOLVED_IDS = 'unresolvedIds' |
const | KEY_PARTS_MAP = 'keyPartsMap' |
const | UNCACHED_IDS = 'uncachedIds' |
const | UNCACHED_TERM_TYPES = 'uncachedTermTypes' |
const | UNCACHED_LANGUAGE_CODES = 'uncachedLanguageCodes' |
const | ENTITY_ID = 'entityId' |
const | TERM_TYPE = 'termType' |
const | LANGUAGE_CODE = 'languageCode' |
$cacheEntryTTL | |
$cache | |
$prefetchedTerms | |
$lookup | |
$redirectResolvingRevisionLookup | |
$termLanguages | |
Prefetches terms from the Cache or via the provided PrefetchingTermLookup if not cached.
Terms requested via the TermLookup methods are also buffered and cached.
CacheInterface determines the medium of caching, and thus the availability (process, server, WAN).
Wikibase\Lib\Store\CachingPrefetchingTermLookup::__construct | ( | CacheInterface | $cache, |
PrefetchingTermLookup | $lookup, | ||
RedirectResolvingLatestRevisionLookup | $redirectResolvingRevisionLookup, | ||
ContentLanguages | $termLanguages, | ||
?int | $ttl = null |
||
) |
|
private |
EntityId | $entityId | |
string | $termType | |
string | $languageCode | |
string | string[] | $freshTerm | string for existing label or description, string[] for existing aliases Should never be null or false |
|
private |
|
private |
|
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 |
|
private |
|
private |
|
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 | |||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
Wikibase\Lib\Store\CachingPrefetchingTermLookup::prefetchTerms | ( | array | $entityIds, |
array | $termTypes, | ||
array | $languageCodes | ||
) |
|
private |
EntityId | $entityId | |
string | $termType | |
string | $languageCode | |
string | string[] | false | $value | string for existing label or description, string[] for existing aliases, false for term known to not exist. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |