Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using URLCache instead of NSCache #15

Open
filimo opened this issue Jun 29, 2021 · 4 comments
Open

Using URLCache instead of NSCache #15

filimo opened this issue Jun 29, 2021 · 4 comments

Comments

@filimo
Copy link

filimo commented Jun 29, 2021

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
Copy link

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

@MKGitHub
Copy link

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
Copy link

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants