Go to the documentation of this file.
3 use Psr\Log\LoggerInterface;
43 [ $this,
'getTitleChangeEvents' ],
44 [ $this,
'getEventAffectedKeys' ],
46 'channel' =>
'table:recentchanges:' . $this->db->getDomainID(),
71 [
'rc_namespace',
'rc_title',
'rc_timestamp',
'rc_id' ],
74 "rc_timestamp > $encStart",
75 "rc_timestamp = $encStart AND rc_id > " .
$db->
addQuotes( $id )
77 "rc_timestamp < $encEnd"
80 [
'ORDER BY' =>
'rc_timestamp ASC, rc_id ASC',
'LIMIT' => $limit ]
86 'id' => (int)$row->rc_id,
87 'pos' => (
int)
wfTimestamp( TS_UNIX, $row->rc_timestamp ),
88 'item' =>
new TitleValue( (
int)$row->rc_namespace, $row->rc_title )
110 if (
$t->getNamespace() >= 0 ) {
122 foreach ( $entities
as $entity ) {
128 $this->logger->debug( __CLASS__ .
': got key(s) ' . implode(
', ',
$keys ) );
__construct(IDatabase $db, LoggerInterface $logger)
processing should stop and the error should be shown to the user * false
static getLocalClusterInstance()
Get the main cluster-local cache object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Class for fixing stale WANObjectCache keys using a purge event source.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
getTitleChangeEvents( $start, $id, $end, $limit)
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
getEventAffectedKeys(WANObjectCache $cache, TitleValue $t)
Gets a list of important cache keys associated with a title.
static newFromTitleValue(TitleValue $titleValue)
Create a new Title from a TitleValue.
Multi-datacenter aware caching interface.
static getMainWANInstance()
Get the main WAN cache object.
invoke( $n=100)
Check and reap stale keys based on a chunk of events.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Class for scanning through chronological, log-structured data or change logs and locally purging cach...
doUpdate()
Perform the actual work.
Interface that deferrable updates should implement.
wfLocalFile( $title)
Get an object referring to a locally registered file.
Represents a page (or page fragment) title within MediaWiki.