Reputation: 1480
I am using Kingfisher on SwiftUI. I download the image from url
with Kingfisher
I will explain the problem step by step:
Problem: When I turn off my internet and open my own application again, I cannot get the pictures from the cache. Why ?
.diskCacheAccessExtending(.expirationTime(.never))
and .diskCacheExpiration(.never)
I used these two functions, but the images are still deleted from the cache.
KFImage:
KFImage.url(URL(string: value))
.resizing(referenceSize: CGSize(width: 50, height: 50), mode: .aspectFit)
.diskCacheExpiration(.never) // 1
.diskCacheAccessExtending(.expirationTime(.never)) // 2
.loadDiskFileSynchronously()
.fade(duration: 1)
Upvotes: 2
Views: 838
Reputation: 520
In KF the cache is being saved in the Cache directory which is not permanent and might be deleted by the system
Upvotes: 1