MediaWiki master
MediaWiki\Parser\ParserCacheMetadata Interface Reference

Read-only interface for metadata about a ParserCache entry. More...

Inherited by MediaWiki\Parser\CacheTime.

Public Member Functions

 getCacheExpiry ()
 Returns the number of seconds after which this object should expire.
 
 getCacheRevisionId ()
 
 getCacheTime ()
 Returns the timestamp when the output was cached or -1 for uncacheable for legacy reasons.
 
 getUsedOptions ()
 Returns the options from its ParserOptions which have been taken into account to produce the output.
 

Detailed Description

Read-only interface for metadata about a ParserCache entry.

Since
1.36

Definition at line 9 of file ParserCacheMetadata.php.

Member Function Documentation

◆ getCacheExpiry()

MediaWiki\Parser\ParserCacheMetadata::getCacheExpiry ( )

Returns the number of seconds after which this object should expire.

This method is used by ParserCache to determine how long the ParserOutput can be cached. The timestamp of expiry can be calculated by adding getCacheExpiry() to getCacheTime(). The value returned by getCacheExpiry is smaller or equal to the smallest number that was provided to a call of ParserOutput::updateCacheExpiry(), and smaller or equal to the value of $wgParserCacheExpireTime.

Returns
int

Implemented in MediaWiki\Parser\CacheTime.

◆ getCacheRevisionId()

MediaWiki\Parser\ParserCacheMetadata::getCacheRevisionId ( )
Returns
int|null Revision id, if any was set

Implemented in MediaWiki\Parser\CacheTime.

◆ getCacheTime()

MediaWiki\Parser\ParserCacheMetadata::getCacheTime ( )

Returns the timestamp when the output was cached or -1 for uncacheable for legacy reasons.

Todo
remove legacy -1
Returns
string|int TS_MW timestamp

Implemented in MediaWiki\Parser\CacheTime.

◆ getUsedOptions()

MediaWiki\Parser\ParserCacheMetadata::getUsedOptions ( )

Returns the options from its ParserOptions which have been taken into account to produce the output.

Returns
string[]

Implemented in MediaWiki\Parser\CacheTime.


The documentation for this interface was generated from the following file: