QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/181052
Change subject: Remove caching of JsonContent's getData object ...................................................................... Remove caching of JsonContent's getData object Caching gets in the way if we allow getData to return either an object or an associative array, as we then would have to cache the associative array representation too. Also, others felt that getData is efficient enough that caching is not needed and should not have been added in e4f84af980. Hence, we remove the caching again. Change-Id: Ib70ff12e8178f519c158a61fb57ffb037623f0c5 --- M includes/content/JsonContent.php 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/181052/1 diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php index ff3b25b..3677115 100644 --- a/includes/content/JsonContent.php +++ b/includes/content/JsonContent.php @@ -17,12 +17,6 @@ class JsonContent extends TextContent { /** - * @since 1.25 - * @var Status - */ - protected $jsonParse; - - /** * @param string $text JSON */ public function __construct( $text ) { @@ -46,10 +40,7 @@ * @return Status */ public function getData() { - if ( $this->jsonParse === null ) { - $this->jsonParse = FormatJson::parse( $this->getNativeData() ); - } - return $this->jsonParse; + return $this->jsonParse = FormatJson::parse( $this->getNativeData() ); } /** -- To view, visit https://gerrit.wikimedia.org/r/181052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib70ff12e8178f519c158a61fb57ffb037623f0c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: QChris <christ...@quelltextlich.at> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits