66 $this->cache = $cache;
68 $this->cacheable =
true;
80 $doSample = ( $sampleRate && mt_rand( 1, $sampleRate ) === 1 );
87 $doSample,
'PoolWorkArticleViewOld'
90 $output = $status->getValue();
92 if ( $output && $output->isCacheable() ) {
93 $this->cache->save( $output, $this->revision, $this->parserOptions, $cacheTime );
103 $parserOutput = $this->cache->get( $this->revision, $this->parserOptions );
105 return $parserOutput ? Status::newGood( $parserOutput ) :
false;
111class_alias( PoolWorkArticleViewOld::class,
'PoolWorkArticleViewOld' );
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
A class containing constants representing the names of configuration variables.
const ParsoidSelectiveUpdateSampleRate
Name constant for the ParsoidSelectiveUpdateSampleRate setting, for use with Config::get()
PoolWorkArticleView for an old revision of a page, using a simple cache.
__construct(PoolCounter $poolCounter, RevisionOutputCache $cache, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, LoggerSpi $loggerSpi)
PoolCounter protected work wrapping RenderedRevision->getRevisionParserOutput.
ParserOptions $parserOptions
renderRevision(?ParserOutput $previousOutput=null, bool $doSample=false, string $sourceLabel='')
Render the given revision.