Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\UncachedTermsPrefetcher Class Reference

Determines which requested terms are not cached, then fetches and caches them. More...

Public Member Functions

 __construct (PrefetchingTermLookup $lookup, RedirectResolvingLatestRevisionLookup $redirectResolvingRevisionLookup, ?int $ttl=null)
 
 prefetchUncached (CacheInterface $cache, array $entityIds, array $termTypes, array $languageCodes)
 

Private Member Functions

 getUncachedLanguagesForEntityTerms (CacheInterface $cache, EntityId $id, array $termTypes, array $languages)
 
 getCacheKey (EntityId $id, string $language, string $termType)
 
 getPrefetchedTermsFromLookup (array $entitiesToPrefetch, array $languagesToPrefetch, array $termTypes)
 
 getTermFromLookup (EntityId $entity, string $termType, string $language)
 

Private Attributes

const DEFAULT_TTL = 60
 
 $lookup
 
 $redirectResolvingRevisionLookup
 
 $cacheEntryTTL
 

Detailed Description

Determines which requested terms are not cached, then fetches and caches them.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\UncachedTermsPrefetcher::__construct ( PrefetchingTermLookup  $lookup,
RedirectResolvingLatestRevisionLookup  $redirectResolvingRevisionLookup,
?int  $ttl = null 
)

Member Function Documentation

◆ getCacheKey()

Wikibase\Lib\Store\UncachedTermsPrefetcher::getCacheKey ( EntityId  $id,
string  $language,
string  $termType 
)
private

◆ getPrefetchedTermsFromLookup()

Wikibase\Lib\Store\UncachedTermsPrefetcher::getPrefetchedTermsFromLookup ( array  $entitiesToPrefetch,
array  $languagesToPrefetch,
array  $termTypes 
)
private

◆ getTermFromLookup()

Wikibase\Lib\Store\UncachedTermsPrefetcher::getTermFromLookup ( EntityId  $entity,
string  $termType,
string  $language 
)
private

◆ getUncachedLanguagesForEntityTerms()

Wikibase\Lib\Store\UncachedTermsPrefetcher::getUncachedLanguagesForEntityTerms ( CacheInterface  $cache,
EntityId  $id,
array  $termTypes,
array  $languages 
)
private

◆ prefetchUncached()

Wikibase\Lib\Store\UncachedTermsPrefetcher::prefetchUncached ( CacheInterface  $cache,
array  $entityIds,
array  $termTypes,
array  $languageCodes 
)

Member Data Documentation

◆ $cacheEntryTTL

Wikibase\Lib\Store\UncachedTermsPrefetcher::$cacheEntryTTL
private

◆ $lookup

Wikibase\Lib\Store\UncachedTermsPrefetcher::$lookup
private

◆ $redirectResolvingRevisionLookup

Wikibase\Lib\Store\UncachedTermsPrefetcher::$redirectResolvingRevisionLookup
private

◆ DEFAULT_TTL

const Wikibase\Lib\Store\UncachedTermsPrefetcher::DEFAULT_TTL = 60
private

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