AsyncImage icon indicating copy to clipboard operation
AsyncImage copied to clipboard

Using URLCache instead of NSCache

Open filimo opened this issue 3 years ago • 4 comments

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.

filimo avatar Jun 29 '21 09:06 filimo

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

EzequielAdrianM avatar Aug 08 '23 01:08 EzequielAdrianM

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?

MKGitHub avatar Sep 12 '23 21:09 MKGitHub

@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+.

ThomasAWRaku avatar Jan 18 '24 03:01 ThomasAWRaku

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

EzequielAdrianM avatar Jan 18 '24 05:01 EzequielAdrianM