swiftui-cached-async-image
swiftui-cached-async-image copied to clipboard
Cache clearing
Is there a recommended way to clear the cache? I have tried
URLCache.shared.removeAllCachedResponses()
but noticed that when I go to settings -> storage -> my app, Documents & Data it doesn’t go down.
My apologies if this is a silly question, rather new to iOS development, thanks for a great library!
+1. Is there a possibility for this? I would like to add a clear cache option in the app, and this would help a lot.
If you use the extension
extension URLCache { static let imageCache = URLCache(memoryCapacity: 512*1000*1000, diskCapacity: 10*1000*1000*1000) }
You can do URLCache.imageCache.removeAllCachedResponses()
and it seems to be working
Thank you kind person!