From: Chad Horohoe Date: Sat, 23 Aug 2008 19:13:04 +0000 (+0000) Subject: md5() the URL in cache keys so they're not excessively long. Thanks to Nikerabbit... X-Git-Tag: 1.31.0-rc.0~45704 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=3f563718c7dee056ecbc1a683a340f213416fd71;p=lhc%2Fweb%2Fwiklou.git md5() the URL in cache keys so they're not excessively long. Thanks to Nikerabbit for pointing this out. --- diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index a96f509572..bd53686d12 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -74,7 +74,7 @@ class ForeignAPIRepo extends FileRepo { 'prop' => 'imageinfo' ) ) ); if( !isset( $this->mQueryCache[$url] ) ) { - $key = wfMemcKey( 'ForeignAPIRepo', 'Metadata', $url ); + $key = wfMemcKey( 'ForeignAPIRepo', 'Metadata', md5( $url ) ); $data = $wgMemc->get( $key ); if( !$data ) { $data = Http::get( $url );