我使用SDWebImage加载图像,但它不是memoryCache,而是diskCache。我是这样做的:
[imgView sd_setImageWithURL:[NSURL URLWithString:urlStr]];
Bool isINMemoryCache = ([[SDImageCache sharedImageCache]
imageFromMemoryCacheForKey:urlStr] != nil);当您再次加载并获取isINMemoryCache时,您将始终获得NO。为什么会这样呢?
发布于 2017-07-20 15:37:46
SDWebImage将图像异步存储到内存和磁盘缓存中。
查看以下代码:SDWebImage Cache
https://stackoverflow.com/questions/45207437
复制相似问题