Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (Cache $cache=null) | |
isCached () | |
setExpiryInSeconds ($expiryInSeconds) | |
isEnabled ($isEnabled) | |
getTimestamp () | |
prepareFactboxContent (OutputPage &$outputPage, ParserOutput $parserOutput) | |
addContentToCache ($key, $text, $revisionId=null) | |
retrieveContent (OutputPage $outputPage) | |
Factbox output caching
Enable ($smwgFactboxUseCache) to use a CacheStore to avoid unaltered content being re-parsed every time the OutputPage hook is executed
GNU GPL v2+
SMW\Factbox\CachedFactbox::__construct | ( | Cache | $cache = null | ) |
Cache | null | $cache |
SMW\Factbox\CachedFactbox::addContentToCache | ( | $key, | |
$text, | |||
$revisionId = null |
|||
) |
string | $key | |
string | $text | |
integer | null | $revisionId |
SMW\Factbox\CachedFactbox::getTimestamp | ( | ) |
SMW\Factbox\CachedFactbox::isCached | ( | ) |
SMW\Factbox\CachedFactbox::isEnabled | ( | $isEnabled | ) |
SMW\Factbox\CachedFactbox::prepareFactboxContent | ( | OutputPage & | $outputPage, |
ParserOutput | $parserOutput | ||
) |
Prepare and update the OutputPage property
Factbox content is either retrived from a CacheStore or re-parsed from the Factbox object
Altered content is tracked using the revision Id, getLatestRevID() only changes after a content modification has occurred.
OutputPage | &$outputPage | |
ParserOutput | $parserOutput |
SMW\Factbox\CachedFactbox::retrieveContent | ( | OutputPage | $outputPage | ) |
Returns parsed Factbox content from either the OutputPage property or from the Cache
OutputPage | $outputPage |
SMW\Factbox\CachedFactbox::setExpiryInSeconds | ( | $expiryInSeconds | ) |