Mollywhite has uploaded a new change for review.
https://gerrit.wikimedia.org/r/75806
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2
refs/changes/06/75806/1
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: newchange
Gerrit-Change-Id: I46fbb46357fd8e1a64d8d11cd0f897dfa4f014f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits