title: How to delete cached SDWebImage from a button's imageView
body: <p>So I have a UIButton whose imageView is set to an image using a download URL. For this purpose I use SDWebImage. </p>
  
  <p>Problem is, when I press the delete button, I want the image to completely disappear but I guess it does not work because the image is still being retrieved from cache. How do I solve this?</p>
  
  <pre><code>class ViewController: UIViewController{
  
      var profileButton: UIButton = {
          let button = UIButton(type: .system)
          return button
      }()
  
      var user: User?
  
      override func viewDidLoad() {
          super.viewDidLoad()
          view.addSubview(profileButton)
          profileButton.addTarget(self, action: #selector(handleDelete), for: .touchUpInside)
  
          self.loadUserPhotos()
      }
  
      fileprivate func loadUserPhotos(){
          let profileImageUrl = self.user?.profileImageUrl1
          if let imageUrl = profileImageUrl, let url = URL(string: imageUrl){
              SDWebImageManager.shared().loadImage(with: url, options: .continueInBackground, progress: nil) { (image, _, _, _, _, _) in
                  self.profileButton.setImage(image?.withRenderingMode(.alwaysOriginal), for: .normal)
              }
          }
      }
  
      @objc func handleDelete(){
          self.user?.profileImageUrl1 = ""
          self.profileButton.imageView?.image = nil
          self.loadUserPhotos()
      }
  }
  </code></pre>