MediaWiki  REL1_19
CacheTime Class Reference
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

Todo:
document

Definition at line 14 of file ParserOutput.php.


Member Function Documentation

Definition at line 22 of file ParserOutput.php.

Referenced by getCacheExpiry().

Here is the caller graph for this function:

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:
$touchedString: the affected article's last touched timestamp
Returns:
Boolean

Definition at line 105 of file ParserOutput.php.

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

Here is the call graph for this function:

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.

Definition at line 64 of file ParserOutput.php.

References $wgParserCacheExpireTime, and containsOldMagic().

Referenced by expired(), and isCacheable().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 20 of file ParserOutput.php.

Referenced by expired().

Here is the caller graph for this function:

Returns:
bool

Definition at line 93 of file ParserOutput.php.

References getCacheExpiry().

Referenced by expired().

Here is the call graph for this function:

Here is the caller graph for this function:

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 31 of file ParserOutput.php.

References $t, and wfSetVar().

Here is the call graph for this function:

Definition at line 23 of file ParserOutput.php.

References wfSetVar().

Here is the call graph for this function:

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 43 of file ParserOutput.php.

Referenced by ParserCache\save().

Here is the caller graph for this function:


Member Data Documentation

CacheTime::$mCacheExpiry = null

Definition at line 17 of file ParserOutput.php.

CacheTime::$mCacheTime = ''

Definition at line 16 of file ParserOutput.php.

CacheTime::$mContainsOldMagic

Definition at line 17 of file ParserOutput.php.

CacheTime::$mVersion = Parser::VERSION

Definition at line 15 of file ParserOutput.php.


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