diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index ad616dc0a2f4e..0644b1785a9d8 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -474,15 +474,12 @@ public function save( } // Save the parser output - $ret = $this->cache->set( + $this->cache->set( $parserOutputKey, $parserOutputData, $expire, BagOStuff::WRITE_ALLOW_SEGMENTS ); - $jsonstr = substr($parserOutputData, 0, 20); - $origstr = substr($parserOutput->getRawText(), 0, 20); - wfDebugLog('pcd', "$ret; e: $expire; k: $parserOutputKey; d: $jsonstr; o: $origstr"); // ...and its pointer to the local cache. $this->metadataProcCache->set( $pageKey, $metadataData, $expire ); diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index cbfe434958e3e..223a47df52a09 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -2487,6 +2487,9 @@ protected function toJsonArray(): array { $data['MaxAdaptiveExpiry'] = $this->mMaxAdaptiveExpiry; } + $trunc_data = substr(json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 0, 35); + wfDebugLog('pcd', $trunc_data); + return $data; }