dmytro-anokhin/url-image

Even if the cache is used, the images will be reloaded in tabview

AntoniotheFuture opened this issue · 1 comments

Hi! I use url-image in a tabview, but even if the cache is used, when I switch between tabs, the images will still be reload.

  • OS: IOS 14

  • iPhone simulator iPhone 8、 iPhone X

  • Are you building a widget or an extension? : NO

  • Version : 3.1.1

  • Code:

let urlImageOption = URLImageOptions.init(urlRequestConfiguration: Download.URLRequestConfiguration.init(allHTTPHeaderFields: headers))
let urlImageService = URLImageService(fileStore: nil, inMemoryStore: URLImageInMemoryStore())

WindowGroup {
    ContentView()
        .environment(\.urlImageOptions, urlImageOption)
        .environment(\.urlImageService, urlImageService)
        .environmentObject(modelData)
}

TabView(selection: $modelData.selectedTab) {
            NavigationView{
                ScrollView{
                   Foreach.....
                    url-image
}}}

Hey, did you ever figure this out? I can't figure out how to configure a working cache with v3.0.