From 3f563718c7dee056ecbc1a683a340f213416fd71 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sat, 23 Aug 2008 19:13:04 +0000 Subject: [PATCH] md5() the URL in cache keys so they're not excessively long. Thanks to Nikerabbit for pointing this out. --- includes/filerepo/ForeignAPIRepo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.20.1