Wikibase
MediaWiki Wikibase extension
|
EntityRevisionLookup implementation that checks an EntityRevisionCache for cached revisions (but doesn't cache on its own). More...
Public Member Functions | |
__construct (EntityRevisionCache $cache, EntityRevisionLookup $lookup) | |
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) | |
Get an EntityRevision from cache or (otherwise) from the underlying EntityRevisionLookup. | |
getEntityRevisionFromCache (EntityId $entityId, $revisionId=0, $mode=LookupConstants::LATEST_FROM_REPLICA) | |
Try to get an EntityRevision from cache. | |
getLatestRevisionId (EntityId $entityId, $mode=LookupConstants::LATEST_FROM_REPLICA) | |
Private Attributes | |
$cache | |
$lookup | |
$shouldVerifyRevision = false | |
EntityRevisionLookup implementation that checks an EntityRevisionCache for cached revisions (but doesn't cache on its own).
Falls back to a given EntityRevisionLookup.
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::__construct | ( | EntityRevisionCache | $cache, |
EntityRevisionLookup | $lookup | ||
) |
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::getEntityRevision | ( | EntityId | $entityId, |
$revisionId = 0 , |
|||
$mode = LookupConstants::LATEST_FROM_REPLICA |
|||
) |
Get an EntityRevision from cache or (otherwise) from the underlying EntityRevisionLookup.
EntityId | $entityId | |
int | $revisionId | The desired revision id, or 0 for the latest revision. |
string | $mode | One of the EntityRevisionLookup::LATEST_* constants. |
StorageException |
Implements Wikibase\Lib\Store\EntityRevisionLookup.
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::getEntityRevisionFromCache | ( | EntityId | $entityId, |
$revisionId = 0 , |
|||
$mode = LookupConstants::LATEST_FROM_REPLICA |
|||
) |
Try to get an EntityRevision from cache.
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 |
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::getLatestRevisionId | ( | EntityId | $entityId, |
$mode = LookupConstants::LATEST_FROM_REPLICA |
|||
) |
EntityId | $entityId | |
string | $mode |
Implements Wikibase\Lib\Store\EntityRevisionLookup.
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::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 |