title: How to delete cache using HanekeSwift Swift?
body: <p>I am stuck with a problem. I want to populate a tableview with some text and a profile image that can change i use this function for it.</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let cell: CommonCellView!
      cell = self.tableView.dequeueReusableCellWithIdentifier("CommonCellView") as! CommonCellView
      cell.nameLabel.text = self.userCollection[indexPath.row].display_name
      cell.companyLabel.text = self.userCollection[indexPath.row].user_organisation
      cell.profileImage.hnk_setImageFromURL(NSURL(string: self.userCollection[indexPath.row].profile_picture)!)
      self.makeImageViewCircular(cell.profileImage.layer, cornerRadius: cell.profileImage.frame.height)
      cell.profileImage.clipsToBounds = true
  
      return cell
  }
  </code></pre>
  
  <p>nothing to suprising here. But when i change my own profile picture then i send it to the API and revist this function it shows the cached image. So i tought i might try something a bit diffent why not get all the images for every cell using Alamofire.</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let cell: CommonCellView!
      cell = self.tableView.dequeueReusableCellWithIdentifier("CommonCellView") as! CommonCellView
      cell.nameLabel.text = self.userCollection[indexPath.row].display_name
      cell.companyLabel.text = self.userCollection[indexPath.row].user_organisation
     cell.profileImage.image = UIImage()
      //getting the cell image
      Alamofire.request(.GET, self.userCollection[indexPath.row].profile_picture)
          .response {(request, response, avatarData, error) in
  
                          let img = UIImage(data: avatarData!)
                          cell.profileImage.image = img
  
      }
      self.makeImageViewCircular(cell.profileImage.layer, cornerRadius: cell.profileImage.frame.height)
      cell.profileImage.clipsToBounds = true
  
      return cell
  }
  </code></pre>
  
  <p>this works to a point where user scrolles very fast the image of a different user will be shown until the request gets fulfilled. Okey so make that happen somewere else and use an array for the images. I also tried that. but because its async the images would go into the array in the wrong order. So back to HanekeSwift. I read the documentation and saw i had a cache on disk but i could not clear or delete it.</p>
  
  <p>to clear the cache i also tried:
  NSURLCache.sharedURLCache().removeAllCachedResponses()</p>
  
  <p>but i did not do a thing. it works in the Alamofire situation but its not a good solution either.</p>
  
  <p>I want to use hanekeSwift because HanekeSwift is fast enough to get all the images. but i want to clear the cache everytime the contoller loads.</p>
  
  <p>Any suggestions would be appreciated!</p>
  
  <p>Cees</p>