case 'PhotometricInterpretation':
switch ( $val ) {
+ case 0:
+ case 1:
case 2:
+ case 3:
+ case 4:
+ case 5:
case 6:
+ case 8:
+ case 9:
+ case 10:
+ case 32803:
+ case 34892:
$val = $this->exifMsg( $tag, $val );
break;
default:
* @since 1.23
*/
public function fetchExtendedMetadata( File $file ) {
- global $wgMemc;
+ $cache = ObjectCache::getMainWANInstance();
// If revision deleted, exit immediately
if ( $file->isDeleted( File::DELETED_FILE ) ) {
$file->getSha1()
);
- $cachedValue = $wgMemc->get( $cacheKey );
+ $cachedValue = $cache->get( $cacheKey );
if (
$cachedValue
&& Hooks::run( 'ValidateExtendedMetadataCache', array( $cachedValue['timestamp'], $file ) )
// 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;