60 $this->cache = $cache;
62 $this->cacheable =
true;
74 $doSample = ( $sampleRate && mt_rand( 1, $sampleRate ) === 1 );
81 $doSample,
'PoolWorkArticleViewOld'
84 $output = $status->getValue();
86 if ( $output && $output->isCacheable() ) {
87 $this->cache->save( $output, $this->revision, $this->parserOptions, $cacheTime );
97 $parserOutput = $this->cache->get( $this->revision, $this->parserOptions );
99 return $parserOutput ? Status::newGood( $parserOutput ) :
false;
105class_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(string $workKey, 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.