From: Tyler Anthony Romeo Date: Mon, 21 Jan 2013 19:32:11 +0000 (-0500) Subject: (bug 44131) Change InfoAction cache key to use SHA1. X-Git-Tag: 1.31.0-rc.0~20966^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=685e2181a686e57d2bde67a4009ed741dbd31f46;p=lhc%2Fweb%2Fwiklou.git (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 --- 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