MediaWiki REL1_39
|
Class allowing easy storage and retrieval of EditResults associated with revisions. More...
Public Member Functions | |
__construct (BagOStuff $mainObjectStash, ILoadBalancer $loadBalancer, ServiceOptions $options) | |
get (int $revisionId) | |
Get an EditResult for the given revision ID. | |
set (int $revisionId, EditResult $editResult) | |
Store the EditResult in the main object stash. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Class allowing easy storage and retrieval of EditResults associated with revisions.
EditResults are stored in the main object stash and (depending on wiki's configuration) in revert change tags. This class stores the relevant data in the main stash. When asked to retrieve an EditResult for an edit and the requested key is not present in the main stash, the class will attempt to retrieve the EditResult from revert tags.
Definition at line 43 of file EditResultCache.php.
MediaWiki\Storage\EditResultCache::__construct | ( | BagOStuff | $mainObjectStash, |
ILoadBalancer | $loadBalancer, | ||
ServiceOptions | $options ) |
BagOStuff | $mainObjectStash | Main object stash, see MediaWikiServices::getMainObjectStash() |
ILoadBalancer | $loadBalancer | |
ServiceOptions | $options |
Definition at line 66 of file EditResultCache.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
MediaWiki\Storage\EditResultCache::get | ( | int | $revisionId | ) |
Get an EditResult for the given revision ID.
Will first attempt to get the EditResult from the main stash. If this fails, it will try to retrieve the EditResult from revert change tags of this revision.
int | $revisionId |
Definition at line 105 of file EditResultCache.php.
References $dbr, and DB_REPLICA.
MediaWiki\Storage\EditResultCache::set | ( | int | $revisionId, |
EditResult | $editResult ) |
Store the EditResult in the main object stash.
int | $revisionId | |
EditResult | $editResult |
Definition at line 86 of file EditResultCache.php.
const MediaWiki\Storage\EditResultCache::CONSTRUCTOR_OPTIONS |
Definition at line 45 of file EditResultCache.php.