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];
|
[self.memoryCache setObject:diskImage forKey:key cost:cost];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDImageCacheType cacheType = diskImage ? SDImageCacheTypeDisk : SDImageCacheTypeNone;
|
|
||||||
|
|
||||||
if (doneBlock) {
|
if (doneBlock) {
|
||||||
if (shouldQueryDiskSync) {
|
if (shouldQueryDiskSync) {
|
||||||
doneBlock(diskImage, diskData, cacheType);
|
doneBlock(diskImage, diskData, SDImageCacheTypeDisk);
|
||||||
} else {
|
} else {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
doneBlock(diskImage, diskData, cacheType);
|
doneBlock(diskImage, diskData, SDImageCacheTypeDisk);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue