Mollywhite has submitted this change and it was merged.

Change subject: Fix bug where cache values were being stored incorrectly.
......................................................................


Fix bug where cache values were being stored incorrectly.

When the cache value was set when the JSON is changed, wgMemcKey
was being called twice and causing the value to be stored in the
wrong place.

Change-Id: I46fbb46357fd8e1a64d8d11cd0f897dfa4f014f8
---
M includes/JsonHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mollywhite: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/includes/JsonHooks.php b/includes/JsonHooks.php
index bd9fdd8..308016b 100644
--- a/includes/JsonHooks.php
+++ b/includes/JsonHooks.php
@@ -88,7 +88,7 @@
                if ( $blockIsValid ) {
                        //Add to cache
                        $cacheKey = wfMemcKey( 'BookManagerv2', 
$pageTitle->getArticleID(), 'json' );
-                       $wgMemc->set( wfMemcKey( $cacheKey ),
+                       $wgMemc->set( $cacheKey,
                                FormatJson::decode( $content->getNativeData(), 
false ));
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/75806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I46fbb46357fd8e1a64d8d11cd0f897dfa4f014f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
Gerrit-Reviewer: Mollywhite <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to