I have all images loaded on my app via SDWebImage. The downloading and caching works great, but I wanted to make a button that can clear all cached images in the entire app.
Swift 4.2 , Xcode 10
pod 'SDWebImage', '5.0.0-beta3'
import SDWebImage @IBAction func ClearCacheButtonClick(_ sender: UIButton) { SDImageCache.shared.clearMemory() SDImageCache.shared.clearDisk() }