X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FFormatMetadata.php;h=73eeba667ae49b75f55fda5029dea64e03b4873a;hb=abb7c6792fab5e9a6e0c088dd820fd3d74c13059;hp=a1cb01c171b7efd745430c53823f52e4bfef5369;hpb=230f2b456b0dd53cb9056edcf765aab49197906a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index a1cb01c171..73eeba667a 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -1,6 +1,4 @@ exifMsg( $tag, $val ); break; default: @@ -1573,7 +1581,7 @@ class FormatMetadata extends ContextSource { * @since 1.23 */ public function fetchExtendedMetadata( File $file ) { - global $wgMemc; + $cache = ObjectCache::getMainWANInstance(); // If revision deleted, exit immediately if ( $file->isDeleted( File::DELETED_FILE ) ) { @@ -1587,7 +1595,7 @@ class FormatMetadata extends ContextSource { $file->getSha1() ); - $cachedValue = $wgMemc->get( $cacheKey ); + $cachedValue = $cache->get( $cacheKey ); if ( $cachedValue && Hooks::run( 'ValidateExtendedMetadataCache', array( $cachedValue['timestamp'], $file ) ) @@ -1607,7 +1615,7 @@ class FormatMetadata extends ContextSource { // computation on a cache hit. $this->sanitizeArrayForAPI( $extendedMetadata ); $valueToCache = array( 'data' => $extendedMetadata, 'timestamp' => wfTimestampNow() ); - $wgMemc->set( $cacheKey, $valueToCache, $maxCacheTime ); + $cache->set( $cacheKey, $valueToCache, $maxCacheTime ); } return $extendedMetadata;