Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -30,8 +30,7 @@ |
31 | 31 | // Optional settings |
32 | 32 | $this->initialCapital = true; // by default |
33 | 33 | foreach ( array( 'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription', |
34 | | - 'thumbScriptUrl', 'initialCapital', 'pathDisclosureProtection', |
35 | | - 'useLocalCache', 'localCacheExpiry' ) as $var ) |
| 34 | + 'thumbScriptUrl', 'initialCapital', 'pathDisclosureProtection', 'descriptionCacheExpiry' ) as $var ) |
36 | 35 | { |
37 | 36 | if ( isset( $info[$var] ) ) { |
38 | 37 | $this->$var = $info[$var]; |
Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -1068,9 +1068,9 @@ |
1069 | 1069 | } |
1070 | 1070 | $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName() ); |
1071 | 1071 | if ( $renderUrl ) { |
1072 | | - if ( $this->repo->useLocalCache ) { |
| 1072 | + if ( $this->repo->descriptionCacheExpiry > 0 ) { |
1073 | 1073 | wfDebug("Attempting to get the description from the transwiki cache..."); |
1074 | | - $key = md5($renderUrl); |
| 1074 | + $key = wfMemcKey( 'filedesc', 'url', md5($link)); |
1075 | 1075 | $obj = $wgMemc->get($key); |
1076 | 1076 | if ($obj) { |
1077 | 1077 | wfDebug("success!\n"); |
— | — | @@ -1080,7 +1080,7 @@ |
1081 | 1081 | } |
1082 | 1082 | wfDebug( "Fetching shared description from $renderUrl\n" ); |
1083 | 1083 | $res = Http::get( $renderUrl ); |
1084 | | - if ( $res && $this->repo->useLocalCache ) $wgMemc->set( $key, $res, $this->repo->localCacheExpiry ); |
| 1084 | + if ( $res && $this->repo->descriptionCacheExpiry > 0 ) $wgMemc->set( $key, $res, $this->repo->descriptionCacheExpiry ); |
1085 | 1085 | return $res; |
1086 | 1086 | } else { |
1087 | 1087 | return false; |