EntityRevisionLookup implementation that checks an EntityRevisionCache for cached revisions (but doesn't cache on its own).
More...
EntityRevisionLookup implementation that checks an EntityRevisionCache for cached revisions (but doesn't cache on its own).
Falls back to a given EntityRevisionLookup.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Marius Hoch
◆ __construct()
◆ getEntityRevision()
◆ getEntityRevisionFromCache()
Try to get an EntityRevision from cache.
- Note
- If this lookup is configured to verify revisions, getLatestRevisionId() will be called on the underlying lookup to check whether the cached revision is still the latest. Otherwise, any cached revision will be used if $revisionId=0.
- Parameters
-
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. |
- Exceptions
-
- Returns
- EntityRevision|null Null if the EntityRevision in question is not cached.
◆ getLatestRevisionId()
◆ setVerifyRevision()
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.
- Parameters
-
bool | $shouldVerifyRevision | |
◆ $cache
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::$cache |
|
private |
◆ $lookup
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::$lookup |
|
private |
◆ $shouldVerifyRevision
Wikibase\Lib\Store\CacheRetrievingEntityRevisionLookup::$shouldVerifyRevision = false |
|
private |
The documentation for this class was generated from the following file: