A WikiPageEntityMetaDataAccessor decorator that implements prefetching and caching.
More...
A WikiPageEntityMetaDataAccessor decorator that implements prefetching and caching.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
◆ __construct()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::__construct |
( |
WikiPageEntityMetaDataAccessor |
$lookup, |
|
|
LoggerInterface |
$logger, |
|
|
|
$maxCacheKeys = 1000 |
|
) |
| |
- Parameters
-
WikiPageEntityMetaDataAccessor | $lookup | |
LoggerInterface | $logger | |
int | $maxCacheKeys | Maximum number of entries to cache (defaults to 1000) |
◆ doFetch()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::doFetch |
( |
|
$mode | ) |
|
|
private |
◆ entityDeleted()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::entityDeleted |
( |
EntityId |
$entityId | ) |
|
- See also
- EntityStoreWatcher::entityDeleted
SingleEntitySourceServices assumes that this only needs to be called if the service has been created as a MapCacheLRU is used internally.
- Parameters
-
Implements Wikibase\Lib\Store\EntityStoreWatcher.
◆ entityUpdated()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::entityUpdated |
( |
EntityRevision |
$entityRevision | ) |
|
- See also
- EntityStoreWatcher::entityDeleted
SingleEntitySourceServices assumes that this only needs to be called if the service has been created as a MapCacheLRU is used internally.
- Parameters
-
EntityRevision | $entityRevision | |
Implements Wikibase\Lib\Store\EntityStoreWatcher.
◆ increaseCacheSize()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::increaseCacheSize |
( |
|
$newSize | ) |
|
|
private |
◆ loadLatestRevisionIds()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::loadLatestRevisionIds |
( |
array |
$entityIds, |
|
|
|
$mode |
|
) |
| |
- See also
- WikiPageEntityMetaDataAccessor::loadLatestRevisionIds
- Parameters
-
EntityId[] | $entityIds | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
- Returns
- (int|bool)[] Array of entity ID serialization => revision IDs or false if an entity could not be found (including if the page is a redirect).
Implements Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor.
◆ loadRevisionInformation()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::loadRevisionInformation |
( |
array |
$entityIds, |
|
|
|
$mode |
|
) |
| |
- See also
- WikiPageEntityMetaDataAccessor::loadRevisionInformation
- Parameters
-
EntityId[] | $entityIds | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
- Returns
- (stdClass|bool)[] Array mapping entity ID serializations to either objects or false if an entity could not be found.
Implements Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor.
◆ loadRevisionInformationByRevisionId()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::loadRevisionInformationByRevisionId |
( |
EntityId |
$entityId, |
|
|
|
$revisionId, |
|
|
|
$mode = LookupConstants::LATEST_FROM_MASTER |
|
) |
| |
- See also
- WikiPageEntityMetaDataAccessor::loadRevisionInformationByRevisionId
- Parameters
-
EntityId | $entityId | |
int | $revisionId | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
- Returns
- stdClass|bool false if no such entity exists
Implements Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor.
◆ prefetch()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::prefetch |
( |
array |
$entityIds | ) |
|
Marks the given entity ids for prefetching.
XXX: This does not obey the definition of the EntityPrefetcher interface, that says this should actually fetch.
- Parameters
-
◆ purge()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::purge |
( |
EntityId |
$entityId | ) |
|
- See also
- EntityPrefetcher::purge
- Parameters
-
◆ purgeAll()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::purgeAll |
( |
| ) |
|
◆ redirectUpdated()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::redirectUpdated |
( |
EntityRedirect |
$entityRedirect, |
|
|
|
$revisionId |
|
) |
| |
- See also
- EntityStoreWatcher::redirectUpdated
SingleEntitySourceServices assumes that this only needs to be called if the service has been created as a MapCacheLRU is used internally.
- Parameters
-
EntityRedirect | $entityRedirect | |
int | $revisionId | |
Implements Wikibase\Lib\Store\EntityStoreWatcher.
◆ store()
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::store |
( |
array |
$data | ) |
|
|
private |
◆ $cache
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::$cache |
|
private |
◆ $logger
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::$logger |
|
private |
◆ $lookup
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::$lookup |
|
private |
◆ $toFetch
Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor::$toFetch = [] |
|
private |
The documentation for this class was generated from the following file: