MediaWiki  REL1_22
CacheTime Class Reference

Parser cache specific expiry check. More...

Inheritance diagram for CacheTime:

List of all members.

Public Member Functions

 containsOldMagic ()
 expired ($touched)
 Return true if this cached output object predates the global or per-article cache invalidation timestamps, or if it comes from an incompatible older version.
 getCacheExpiry ()
 Returns the number of seconds after which this object should expire.
 getCacheTime ()
 isCacheable ()
 setCacheTime ($t)
 setCacheTime() sets the timestamp expressing when the page has been rendered.
 setContainsOldMagic ($com)
 updateCacheExpiry ($seconds)
 Sets the number of seconds after which this object should expire.

Public Attributes

 $mCacheExpiry = null
 $mCacheTime = ''
 $mContainsOldMagic
 $mVersion = Parser::VERSION

Detailed Description

Parser cache specific expiry check.

Definition at line 29 of file CacheTime.php.


Member Function Documentation

Definition at line 38 of file CacheTime.php.

Referenced by getCacheExpiry().

CacheTime::expired ( touched)

Return true if this cached output object predates the global or per-article cache invalidation timestamps, or if it comes from an incompatible older version.

Parameters:
string$touchedthe affected article's last touched timestamp
Returns:
Boolean

Definition at line 122 of file CacheTime.php.

References getCacheExpiry(), getCacheTime(), global, isCacheable(), Parser\VERSION, and wfTimestamp().

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 updateCacheExpiry(), and smaller or equal to the value of $wgParserCacheExpireTime.

Returns:
int|mixed|null

Definition at line 81 of file CacheTime.php.

References containsOldMagic(), and global.

Referenced by expired(), and isCacheable().

Definition at line 36 of file CacheTime.php.

Referenced by expired().

Returns:
bool

Definition at line 110 of file CacheTime.php.

References getCacheExpiry().

Referenced by expired().

setCacheTime() sets the timestamp expressing when the page has been rendered.

This doesn not control expiry, see updateCacheExpiry() for that!

Parameters:
$tstring
Returns:
string

Definition at line 47 of file CacheTime.php.

References $t, and wfSetVar().

Definition at line 39 of file CacheTime.php.

References wfSetVar().

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

This value is used with the ParserCache. If called with a value greater than the value provided at any previous call, the new call has no effect. The value returned by getCacheExpiry is smaller or equal to the smallest number that was provided as an argument to updateCacheExpiry().

Parameters:
$secondsnumber

Definition at line 59 of file CacheTime.php.

Referenced by ParserCache\save().


Member Data Documentation

CacheTime::$mCacheExpiry = null

Definition at line 33 of file CacheTime.php.

CacheTime::$mCacheTime = ''

Definition at line 32 of file CacheTime.php.

CacheTime::$mContainsOldMagic

Definition at line 33 of file CacheTime.php.

CacheTime::$mVersion = Parser::VERSION

Definition at line 31 of file CacheTime.php.


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