diff --git a/Math.hooks.php b/Math.hooks.php index f8e4656..a70da28 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -55,6 +55,7 @@ class MathHooks { if ( $wgUseMathJax && $mode == MW_MATH_MATHJAX ) { $parser->getOutput()->addModules( array( 'ext.math.mathjax.enabler' ) ); } + $renderer->writeCache(); return $wgContLang->armourMath( $renderedMath ); } diff --git a/MathTexvc.php b/MathTexvc.php index 8b4f877..25f456a 100644 --- a/MathTexvc.php +++ b/MathTexvc.php @@ -34,7 +34,6 @@ class MathTexvc extends MathRenderer { if ( $result != MW_TEXVC_SUCCESS ) { return $result; } - $this->writeCache(); } return $this->doHTMLRender(); } @@ -276,7 +275,8 @@ class MathTexvc extends MathRenderer { */ public function writeCache() { global $wgUseSquid; - if ( !$this->isRecall() ) { + // If cache hit, don't write anything. + if ( $this->isRecall() ) { return; } $this->writeDBEntry();