diff --git a/SDWebImage/Core/SDImageCache.m b/SDWebImage/Core/SDImageCache.m index f197f596..c2f18a9d 100644 --- a/SDWebImage/Core/SDImageCache.m +++ b/SDWebImage/Core/SDImageCache.m @@ -539,14 +539,13 @@ static NSString * _defaultDiskCacheDirectory; [self.memoryCache setObject:diskImage forKey:key cost:cost]; } } - SDImageCacheType cacheType = diskImage ? SDImageCacheTypeDisk : SDImageCacheTypeNone; if (doneBlock) { if (shouldQueryDiskSync) { - doneBlock(diskImage, diskData, cacheType); + doneBlock(diskImage, diskData, SDImageCacheTypeDisk); } else { dispatch_async(dispatch_get_main_queue(), ^{ - doneBlock(diskImage, diskData, cacheType); + doneBlock(diskImage, diskData, SDImageCacheTypeDisk); }); } }