jenkins-bot has submitted this change and it was merged. Change subject: Use the page ID in the memcached key to ensure the accuracy of cached data ......................................................................
Use the page ID in the memcached key to ensure the accuracy of cached data Special:ArticlesHome by default displays new blog articles on the right side of the page (call to ArticlesHome::displayNewestPages()). This method in question calls BlogPage::getVotesForPage() for each returned page to get the correct amount of votes. Based on some quick testing on my Labs instance, the SQL query used by BlogPage::getVotesForPage() does return the correct result, so I'm guessing this is a cache thing. Bug: T126109 Change-Id: Icf143fe5e762beadcbe752aa8f1d8a86a8b1375f --- M BlogPageClass.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/BlogPageClass.php b/BlogPageClass.php index c6785da..59128d1 100644 --- a/BlogPageClass.php +++ b/BlogPageClass.php @@ -1020,7 +1020,7 @@ global $wgMemc; // Try cache first - $key = wfMemcKey( 'blog', 'comments', 'count' ); + $key = wfMemcKey( 'blog', 'comments', 'count', 'pageid-' . $id ); $data = $wgMemc->get( $key ); if ( $data != '' ) { @@ -1053,7 +1053,7 @@ global $wgMemc; // Try cache first - $key = wfMemcKey( 'blog', 'vote', 'count' ); + $key = wfMemcKey( 'blog', 'vote', 'count', 'pageid-' . $id ); $data = $wgMemc->get( $key ); if ( $data != '' ) { -- To view, visit https://gerrit.wikimedia.org/r/287451 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf143fe5e762beadcbe752aa8f1d8a86a8b1375f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlogPage Gerrit-Branch: master Gerrit-Owner: Jack Phoenix <j...@countervandalism.net> Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net> Gerrit-Reviewer: Lewis Cawte <le...@lewiscawte.me> Gerrit-Reviewer: UltrasonicNXT <adamr_car...@btinternet.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits