直接从SDWebImage的缓存中取图片|sdwebimage内存缓存

直接从SDWebImage的缓存中取图片|sdwebimage内存缓存
#import "SDWebImageManager.h" #import "SDImageCache.h" NSString* strUrl = @"/d/ezdimg/2023021818/eogvk4f2gxt8267.webp"; SDWebImageManager *manager = [SDWebImageManager sharedManager]; NSString* key = [manager cacheKeyForURL:[NSURL URLWithString:strUrl]]; SDImageCache* cache = [SDImageCache sharedImageCache]; //此方法会先从memory中取。 image = [cache imageFromDiskCacheForKey:key];

推荐阅读