SDWebImageSwiftUI icon indicating copy to clipboard operation
SDWebImageSwiftUI copied to clipboard

这个框架有没有类似SDWebImage那样的自定义缓存策略的block

Open wdq123550 opened this issue 2 years ago • 2 comments

这个框架有没有类似SDWebImage那样的自定义缓存策略的block filterCacheKey

wdq123550 avatar May 31 '23 10:05 wdq123550

This library is top-level UI part of SDWebImage

So, all your configuration on SDWebImage, Always and should always effect the SDWebImageSwiftUI

dreampiggy avatar May 31 '23 11:05 dreampiggy

You can use

let requestFilter = SDWebImageRequestFilter { req
   if (req.HTTPHeader == "foobar") { // .. }
}
WebImage(url: url, context: [.requestFilter: requestFilter]

dreampiggy avatar May 31 '23 11:05 dreampiggy