page: Use MainObjectStash instead of 'db-replicated' cache
This is for page-recent-delete and db-replicated should not be used for this. Simply use the standard and common service providing the same functionality. Bug: T272512 Change-Id: Iabaffd726370f5a580097819fd854da82bf43907
This commit is contained in:
parent
40f1c72fda
commit
5954d3edff
3 changed files with 6 additions and 6 deletions
|
|
@ -2048,7 +2048,7 @@ return [
|
|||
$services->getCollationFactory(),
|
||||
$services->getJobQueueGroup(),
|
||||
$services->getCommentStore(),
|
||||
ObjectCache::getInstance( 'db-replicated' ),
|
||||
$services->getMainObjectStash(),
|
||||
WikiMap::getCurrentWikiDbDomain()->getId(),
|
||||
WebRequest::getRequestId(),
|
||||
$services->getBacklinkCacheFactory(),
|
||||
|
|
|
|||
|
|
@ -1372,7 +1372,7 @@ class Article implements Page {
|
|||
# Show delete and move logs if there were any such events.
|
||||
# The logging query can DOS the site when bots/crawlers cause 404 floods,
|
||||
# so be careful showing this. 404 pages must be cheap as they are hard to cache.
|
||||
$dbCache = ObjectCache::getInstance( 'db-replicated' );
|
||||
$dbCache = MediaWikiServices::getInstance()->getMainObjectStash();
|
||||
$key = $dbCache->makeKey( 'page-recent-delete', md5( $title->getPrefixedText() ) );
|
||||
$isRegistered = $contextUser->isRegistered();
|
||||
$sessionExists = $this->getContext()->getRequest()->getSession()->isPersistent();
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class PageCommandFactory implements
|
|||
private $commentStore;
|
||||
|
||||
/** @var BagOStuff */
|
||||
private $dbReplicatedCache;
|
||||
private $mainStash;
|
||||
|
||||
/** @var string */
|
||||
private $localWikiID;
|
||||
|
|
@ -167,7 +167,7 @@ class PageCommandFactory implements
|
|||
CollationFactory $collationFactory,
|
||||
JobQueueGroup $jobQueueGroup,
|
||||
CommentStore $commentStore,
|
||||
BagOStuff $dbReplicatedCache,
|
||||
BagOStuff $mainStash,
|
||||
string $localWikiID,
|
||||
string $webRequestID,
|
||||
BacklinkCacheFactory $backlinkCacheFactory,
|
||||
|
|
@ -194,7 +194,7 @@ class PageCommandFactory implements
|
|||
$this->collationFactory = $collationFactory;
|
||||
$this->jobQueueGroup = $jobQueueGroup;
|
||||
$this->commentStore = $commentStore;
|
||||
$this->dbReplicatedCache = $dbReplicatedCache;
|
||||
$this->mainStash = $mainStash;
|
||||
$this->localWikiID = $localWikiID;
|
||||
$this->webRequestID = $webRequestID;
|
||||
$this->backlinkCacheFactory = $backlinkCacheFactory;
|
||||
|
|
@ -235,7 +235,7 @@ class PageCommandFactory implements
|
|||
$this->jobQueueGroup,
|
||||
$this->commentStore,
|
||||
new ServiceOptions( DeletePage::CONSTRUCTOR_OPTIONS, $this->config ),
|
||||
$this->dbReplicatedCache,
|
||||
$this->mainStash,
|
||||
$this->localWikiID,
|
||||
$this->webRequestID,
|
||||
$this->wikiPageFactory,
|
||||
|
|
|
|||
Loading…
Reference in a new issue