I'm trying to use SDWebImage to cache images retrieved from the web. The image gets cached to memory all the time. I've seen the documentation that saving to disk is default.
Everything will be handled for you, from async downloads to caching management.
By default SDImageCache will lookup the disk cache if an image can't be found in the memory cache. You can prevent this from happening by calling the alternative method imageFromMemoryCacheForKey:.
However every time I relaunch my application, SDWebImage downloads the file again from the web and not retrieving it from the disk. I will receive SDImageCacheType of value SDImageCacheTypeNone when my application reloads, and SDImageCacheTypeMemory when I keep scrolling without exiting my application.
Any ideas? I've tried caching manually but the image always appear black. Not sure what where wrong. Any help is appreciated!
I'm using this method to download the images:
- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock {