62 if ( $this->mCacheTime ===
'' ) {
63 $this->mCacheTime = MWTimestamp::now();
76 if ( is_string(
$t ) &&
$t !==
'-1' ) {
77 $t = MWTimestamp::convert( TS_MW,
$t );
96 $this->mCacheRevisionId = $id;
113 $seconds = (int)$seconds;
115 if ( $this->mCacheExpiry ===
null || $this->mCacheExpiry > $seconds ) {
116 $this->mCacheExpiry = $seconds;
133 if ( $this->mCacheTime < 0 ) {
139 if ( $expire ===
null ) {
145 if ( $expire <= 0 ) {
170 $expiry = MWTimestamp::convert( TS_MW, MWTimestamp::time() - $this->
getCacheExpiry() );
176 || !isset( $this->mVersion )
177 || version_compare( $this->mVersion, Parser::VERSION,
"lt" );
194 return $cached !==
null && $id !== $cached;
$wgCacheEpoch
Set this to current time to invalidate all prior cached pages.
$wgParserCacheExpireTime
The expiry time for the parser cache, in seconds.
wfSetVar(&$dest, $source, $force=false)
Sets dest to source and returns the original value of dest If source is NULL, it just returns the val...
Parser cache specific expiry check.
int null $mCacheRevisionId
Revision ID that was parsed.
string int $mCacheTime
TS_MW timestamp when this object was generated, or -1 for not cacheable.
string null $mVersion
Compatibility check.
updateCacheExpiry( $seconds)
Sets the number of seconds after which this object should expire.
setCacheTime( $t)
setCacheTime() sets the timestamp expressing when the page has been rendered.
isDifferentRevision( $id)
Return true if this cached output object is for a different revision of the page.
string[] $mUsedOptions
ParserOptions which have been taken into account to produce output.
int null $mCacheExpiry
Seconds after which the object should expire, use 0 for not cacheable.
expired( $touched)
Return true if this cached output object predates the global or per-article cache invalidation timest...
getCacheExpiry()
Returns the number of seconds after which this object should expire.
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