Skip to content

Commit

Permalink
Merge pull request ibireme#174 from allsome/master
Browse files Browse the repository at this point in the history
修复设置YYWebImageOptionIgnoreDiskCache参数无效的问题
  • Loading branch information
ibireme authored Jun 26, 2017
2 parents aa28792 + b90d245 commit f591203
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion YYWebImage/YYWebImageOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ - (void)_didReceiveImageFromWeb:(UIImage *)image {
if (image || (_options & YYWebImageOptionRefreshImageCache)) {
NSData *data = _data;
dispatch_async([YYWebImageOperation _imageQueue], ^{
[_cache setImage:image imageData:data forKey:_cacheKey withType:YYImageCacheTypeAll];
YYImageCacheType cacheType = (_options & YYWebImageOptionIgnoreDiskCache) ? YYImageCacheTypeMemory : YYImageCacheTypeAll;
[_cache setImage:image imageData:data forKey:_cacheKey withType:cacheType];
});
}
}
Expand Down

0 comments on commit f591203

Please sign in to comment.