V8tr / AsyncImage

Asynchronous Image Loading from URL in SwiftUI
https://www.vadimbulavin.com/
The Unlicense
274 stars 36 forks source link

Using URLCache instead of NSCache #15

Open filimo opened 3 years ago

filimo commented 3 years ago

URLCache is both in-memory and on-disk cache, and it doesn't allocate a chunk of memory for it's data. You can define it's in-memory and on-disk size, which is more flexible. URLCache will persist the cached data until the system runs low on disk space.

EzequielAdrianM commented 1 year ago

Recent AsyncImage official implementation by Apple uses URLCache underneath, so this repository is not needed any more...

MKGitHub commented 1 year ago

Recent AsyncImage official implementation by Apple uses URLCache underneath, so this repository is not needed any more...

…and the reference to this info you have given is…where?

ThomasAWRaku commented 9 months ago

@MKGitHub the AsyncImage @EzequielAdrianM referred to is documented here: https://developer.apple.com/documentation/swiftui/asyncimage

However, that class is only available for iOS 15+.

EzequielAdrianM commented 9 months ago

Recent AsyncImage official implementation by Apple uses URLCache underneath, so this repository is not needed any more...

…and the reference to this info you have given is…where?

My apologies @MKGitHub , the official AsyncImage by Apple does not implement any caching, it just re downloads the image every single time you request it. For real disk and memory caching we ended up using Kingfisher