MediaWiki REL1_39
MediaWiki\Parser\ParserCacheMetadata Interface Reference

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

Inheritance diagram for MediaWiki\Parser\ParserCacheMetadata:

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 CacheTime.

◆ getCacheRevisionId()

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

Implemented in 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 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 CacheTime.


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