What happens to SDWebImage Cached Images in my app when the image file on the server changes?

后端 未结 10 1240
夕颜
夕颜 2020-12-07 09:57

I am using the SDWebImage library to cache web images in my app:

https://github.com/rs/SDWebImage/blob/master/README.md

Current Usage:



        
10条回答
  •  清歌不尽
    2020-12-07 10:12

    As I read in the SDWeb readme in git, It might help:

    In your case, you may use the SDWebImageRefreshCached flag. This will slightly degrade the performance but will respect the HTTP caching control headers:

    [imageView sd_setImageWithURL:[NSURL URLWithString:@"https://graph.facebook.com/olivier.poitrey/picture"]
                     placeholderImage:[UIImage imageNamed:@"avatar-placeholder.png"]
                              options:SDWebImageRefreshCached];
    

提交回复
热议问题