Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4153609
RevisionLocalCache.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
RevisionLocalCache.php
View Options
<?php
namespace
MediaWiki\Extension\Notifications\Cache
;
use
MediaWiki\Revision\RevisionStore
;
use
Wikimedia\Rdbms\IConnectionProvider
;
/**
* Cache class that maps revision id to RevisionStore object
* @xxx Like TitleLocalCache, this class shouldn't need to exist.
*/
class
RevisionLocalCache
extends
LocalCache
{
private
IConnectionProvider
$dbProvider
;
private
RevisionStore
$revisionStore
;
public
function
__construct
(
IConnectionProvider
$dbProvider
,
RevisionStore
$revisionStore
)
{
parent
::
__construct
();
$this
->
dbProvider
=
$dbProvider
;
$this
->
revisionStore
=
$revisionStore
;
}
/**
* @inheritDoc
*/
protected
function
resolve
(
array
$lookups
)
{
$dbr
=
$this
->
dbProvider
->
getReplicaDatabase
();
$revQuery
=
$this
->
revisionStore
->
getQueryInfo
(
[
'page'
,
'user'
]
);
$res
=
$dbr
->
newSelectQueryBuilder
()
->
queryInfo
(
$revQuery
)
->
where
(
[
'rev_id'
=>
$lookups
]
)
->
caller
(
__METHOD__
)
->
fetchResultSet
();
foreach
(
$res
as
$row
)
{
yield
$row
->
rev_id
=>
$this
->
revisionStore
->
newRevisionFromRow
(
$row
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 20:47 (7 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2d/e6/fc2eda6b3c16b993daff81fdec3b
Default Alt Text
RevisionLocalCache.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment