From 685e2181a686e57d2bde67a4009ed741dbd31f46 Mon Sep 17 00:00:00 2001 From: Tyler Anthony Romeo Date: Mon, 21 Jan 2013 14:32:11 -0500 Subject: [PATCH] (bug 44131) Change InfoAction cache key to use SHA1. Long title names caused errors in caching of InfoAction results, so this commit wraps the title in a SHA1 call so that all titles will have valid cache keys. Change-Id: I803a7dd58f5bd69070291192d3eead065d0403f1 --- includes/actions/InfoAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index dedc61f29e..956104ca34 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -172,7 +172,7 @@ class InfoAction extends FormlessAction { $title = $this->getTitle(); $id = $title->getArticleID(); - $memcKey = wfMemcKey( 'infoaction', $title->getPrefixedText(), $this->page->getLatest() ); + $memcKey = wfMemcKey( 'infoaction', sha1( $title->getPrefixedText() ), $this->page->getLatest() ); $pageCounts = $wgMemc->get( $memcKey ); if ( $pageCounts === false ) { // Get page information that would be too "expensive" to retrieve by normal means -- 2.20.1