* @param ParserOptions $pstOpts Options for $pstContent (MUST be for prospective author)
* @param ParserOptions $pOpts Options for $pOut
* @param string $timestamp TS_MW timestamp of parser output generation
- * @return boolean Success
+ * @return bool Success
*/
public static function stashEditFromPreview(
Page $page, Content $content, Content $pstContent, ParserOutput $pOut,
$wgMemc->unlock( $key );
}
$sec = microtime( true ) - $start;
- wfDebugLog( 'StashEdit', "Waited $sec seconds on '$key'." );
+ if ( $sec > .01 ) {
+ wfDebugLog( 'StashEdit', "Waited $sec seconds on '$key'." );
+ }
}
if ( !is_object( $editInfo ) || !$editInfo->output ) {
// If an item is renewed, mind the cache TTL determined by config and parser functions
$since = time() - wfTimestamp( TS_UNIX, $parserOutput->getTimestamp() );
$ttl = min( $parserOutput->getCacheExpiry() - $since, 5 * 60 );
+
if ( $ttl > 0 && !$parserOutput->getFlag( 'vary-revision' ) ) {
// Only store what is actually needed
$stashInfo = (object)array(