Wikibase
MediaWiki Wikibase extension
|
Implementation of EntityLookup that caches the obtained entities. More...
Public Member Functions | |
__construct (EntityRevisionCache $entityRevisionCache, EntityRevisionLookup $entityRevisionLookup) | |
setVerifyRevision ( $shouldVerifyRevision) | |
Determine whether the revision of the cached entity should be verified against the current revision in the underlying lookup. | |
getEntityRevision (EntityId $entityId, $revisionId=0, $mode=LookupConstants::LATEST_FROM_REPLICA) | |
getLatestRevisionId (EntityId $entityId, $mode=LookupConstants::LATEST_FROM_REPLICA) | |
entityUpdated (EntityRevision $entityRevision) | |
Notifies the cache that an Entity was created or updated. | |
redirectUpdated (EntityRedirect $entityRedirect, $revisionId) | |
Notifies the cache that a redirect was created or updated. | |
entityDeleted (EntityId $entityId) | |
Notifies the cache that an Entity or redirect was deleted. | |
Private Member Functions | |
fetchEntityRevision (EntityId $entityId, $revisionId, $mode) | |
Fetches the EntityRevision and updates the cache accordingly. | |
Private Attributes | |
$entityRevisionCache | |
$lookup | |
$cacheRetrievingLookup | |
$shouldVerifyRevision = false | |
Implementation of EntityLookup that caches the obtained entities.
Wikibase\Lib\Store\CachingEntityRevisionLookup::__construct | ( | EntityRevisionCache | $entityRevisionCache, |
EntityRevisionLookup | $entityRevisionLookup | ||
) |
Wikibase\Lib\Store\CachingEntityRevisionLookup::entityDeleted | ( | EntityId | $entityId | ) |
Notifies the cache that an Entity or redirect was deleted.
EntityId | $entityId |
Implements Wikibase\Lib\Store\EntityStoreWatcher.
Wikibase\Lib\Store\CachingEntityRevisionLookup::entityUpdated | ( | EntityRevision | $entityRevision | ) |
Notifies the cache that an Entity was created or updated.
EntityRevision | $entityRevision |
Implements Wikibase\Lib\Store\EntityStoreWatcher.
|
private |
Fetches the EntityRevision and updates the cache accordingly.
EntityId | $entityId | |
int | $revisionId | |
string | $mode |
StorageException |
Wikibase\Lib\Store\CachingEntityRevisionLookup::getEntityRevision | ( | EntityId | $entityId, |
$revisionId = 0 , |
|||
$mode = LookupConstants::LATEST_FROM_REPLICA |
|||
) |
EntityId | $entityId | |
int | $revisionId | The desired revision id, or 0 for the latest revision. |
string | $mode | LATEST_FROM_REPLICA, LATEST_FROM_REPLICA_WITH_FALLBACK or LATEST_FROM_MASTER. |
StorageException |
Implements Wikibase\Lib\Store\EntityRevisionLookup.
Wikibase\Lib\Store\CachingEntityRevisionLookup::getLatestRevisionId | ( | EntityId | $entityId, |
$mode = LookupConstants::LATEST_FROM_REPLICA |
|||
) |
EntityId | $entityId | |
string | $mode |
Implements Wikibase\Lib\Store\EntityRevisionLookup.
Wikibase\Lib\Store\CachingEntityRevisionLookup::redirectUpdated | ( | EntityRedirect | $entityRedirect, |
$revisionId | |||
) |
Notifies the cache that a redirect was created or updated.
EntityRedirect | $entityRedirect | |
int | $revisionId |
Implements Wikibase\Lib\Store\EntityStoreWatcher.
Wikibase\Lib\Store\CachingEntityRevisionLookup::setVerifyRevision | ( | $shouldVerifyRevision | ) |
Determine whether the revision of the cached entity should be verified against the current revision in the underlying lookup.
bool | $shouldVerifyRevision |
|
private |
|
private |
|
private |
|
private |