Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\Factbox\CachedFactbox Class Reference

Public Member Functions

 __construct (EntityCache $entityCache)
 
 isCached ()
 
 setFeatureSet ( $featureSet)
 
 setShowFactboxEdit ( $showFactboxEdit)
 
 setShowFactbox ( $showFactbox)
 
 setCacheTTL ( $cacheTTL)
 
 isEnabled ( $isEnabled)
 
 getTimestamp ()
 
 prepare (OutputPage &$outputPage, ParserOutput $parserOutput)
 
 addContentToCache ( $key, $text, $rev_id=null, $lang='en', $feature_set=null)
 
 retrieveContent (OutputPage $outputPage)
 

Static Public Member Functions

static makeCacheKey ( $id)
 

Detailed Description

Factbox output caching

Use a EntityCache to avoid unaltered content being re-parsed every time the OutputPage hook is executed.

GNU GPL v2+

Since
1.9
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\Factbox\CachedFactbox::__construct ( EntityCache  $entityCache)
Since
1.9
Parameters
EntityCache$entityCache

Member Function Documentation

◆ addContentToCache()

SMW\Factbox\CachedFactbox::addContentToCache (   $key,
  $text,
  $rev_id = null,
  $lang = 'en',
  $feature_set = null 
)
Since
2.2
Parameters
string$key
string$text
integer | null$revisionId

◆ getTimestamp()

SMW\Factbox\CachedFactbox::getTimestamp ( )
Since
2.2
Returns
integer

◆ isCached()

SMW\Factbox\CachedFactbox::isCached ( )
Since
1.9
Returns
boolean

◆ isEnabled()

SMW\Factbox\CachedFactbox::isEnabled (   $isEnabled)
Since
2.5
Returns
boolean

◆ makeCacheKey()

static SMW\Factbox\CachedFactbox::makeCacheKey (   $id)
static
Since
2.2
Returns
integer

◆ prepare()

SMW\Factbox\CachedFactbox::prepare ( OutputPage &  $outputPage,
ParserOutput  $parserOutput 
)

Prepare and update the OutputPage property

Factbox content is either retrieved 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.

Since
1.9
Parameters
OutputPage&$outputPage
ParserOutput$parserOutput

◆ retrieveContent()

SMW\Factbox\CachedFactbox::retrieveContent ( OutputPage  $outputPage)

Returns parsed Factbox content from either the OutputPage property or from the Cache

Since
1.9
Parameters
OutputPage$outputPage
Returns
string

◆ setCacheTTL()

SMW\Factbox\CachedFactbox::setCacheTTL (   $cacheTTL)
Since
2.5
Parameters
integer$cacheTTL

◆ setFeatureSet()

SMW\Factbox\CachedFactbox::setFeatureSet (   $featureSet)
Since
3.0
Parameters
integer$featureSet

◆ setShowFactbox()

SMW\Factbox\CachedFactbox::setShowFactbox (   $showFactbox)
Since
3.1
Parameters
integer$showFactbox

◆ setShowFactboxEdit()

SMW\Factbox\CachedFactbox::setShowFactboxEdit (   $showFactboxEdit)
Since
3.1
Parameters
integer$showFactboxEdit

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

About | General disclaimer | Privacy policy