Change to always return SDImageCacheTypeDisk cache type when querying memory cache (unless user cancel the query)
This commit is contained in:
parent
2c9eaccf23
commit
bcda3f5000
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue