Xcode: SDWebImage clear cache for single image

前端 未结 2 757
感情败类
感情败类 2021-02-19 05:00

I\'m using SDWebImage to asynchronous image downloader with cache support.

It\'s working perfectly except that sometimes the image got updated on the server with same na

2条回答
  •  忘了有多久
    2021-02-19 05:18

    - (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk;
    

    API is right. It work for me. Do you know the api is in class SDImageCache which is a singleton class.
    You could use it like this:

    [[SDImageCache sharedImageCache] removeImageForKey:image_url fromDisk:YES];
    

提交回复
热议问题