Only update the cache on cache miss
Change I9b1d68c4faa8d177d8d0088fa1a5879caed4f1fe added an indiscriminant call to writeCache(). I assume that it was supposed to be regulated by the check for $this->isRecall() (which is a getter for '$this->recall'), but there was no concomitant change to ensure that recall is set true on cache hits. My fix does not set recall to true. The style of "pass-by-attribute" is tricky and should be factored out by a subsequent change. This change moves the call to writeCache() so that it is only called on cache miss. Change-Id: I9b690e55001859c97fd40330272791d49ec6de75
This commit is contained in:
parent
7831957091
commit
9ba4ef269d
|
@ -55,7 +55,6 @@ class MathHooks {
|
||||||
if ( $wgUseMathJax && $mode == MW_MATH_MATHJAX ) {
|
if ( $wgUseMathJax && $mode == MW_MATH_MATHJAX ) {
|
||||||
$parser->getOutput()->addModules( array( 'ext.math.mathjax.enabler' ) );
|
$parser->getOutput()->addModules( array( 'ext.math.mathjax.enabler' ) );
|
||||||
}
|
}
|
||||||
$renderer->writeCache();
|
|
||||||
return $wgContLang->armourMath( $renderedMath );
|
return $wgContLang->armourMath( $renderedMath );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ class MathTexvc extends MathRenderer {
|
||||||
if ( $result != MW_TEXVC_SUCCESS ) {
|
if ( $result != MW_TEXVC_SUCCESS ) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
$this->writeCache();
|
||||||
}
|
}
|
||||||
return $this->doHTMLRender();
|
return $this->doHTMLRender();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue